JP2015138356A - Software structure visualization device - Google Patents
Software structure visualization device Download PDFInfo
- Publication number
- JP2015138356A JP2015138356A JP2014009016A JP2014009016A JP2015138356A JP 2015138356 A JP2015138356 A JP 2015138356A JP 2014009016 A JP2014009016 A JP 2014009016A JP 2014009016 A JP2014009016 A JP 2014009016A JP 2015138356 A JP2015138356 A JP 2015138356A
- Authority
- JP
- Japan
- Prior art keywords
- software
- unit
- component
- syntax
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
Description
本発明は、ソフトウェア構造可視化装置に関する。 The present invention relates to a software structure visualization apparatus.
従来、ソースコードを解析して、関数の呼び出し関係と関数とモジュールとの包含関係から設定したモジュール単位で表したモジュール間呼出関連図を作成するソースコード解析機器がある(例えば、特許文献1を参照)。 2. Description of the Related Art Conventionally, there is a source code analysis device that analyzes a source code and creates an inter-module call relation diagram expressed in module units set from a function call relationship and a function and module inclusion relationship (for example, see Patent Document 1). reference).
また、入力されたプログラムのソースコードを標準仕様に従って構文解析し、解析結果から再構築したプログラムの構造情報をドキュメントとして生成するドキュメント生成手段がある(例えば、特許文献2を参照)。 In addition, there is document generation means that parses the source code of an input program according to a standard specification and generates structure information of the program reconstructed from the analysis result as a document (see, for example, Patent Document 2).
また、ソースコードを解析して構文情報を出力する構文解析手段がある(例えば、特許文献3を参照)。 Further, there is a syntax analysis unit that analyzes source code and outputs syntax information (see, for example, Patent Document 3).
しかし、上記従来技術においては、各コンポーネントが共通のデータを扱う特定のコンポーネントを経由してデータをやり取りするソフトウェアの構造を可視化する場合に、各コンポーネントが特定のコンポーネントに繋がっている構造図が作成されてしまう場合があった。 However, in the above-mentioned prior art, when visualizing the structure of software that exchanges data via specific components that handle common data, a structure diagram is created in which each component is connected to a specific component. There was a case where it was done.
そこで、本発明は、各コンポーネントが共通のデータを扱う特定のコンポーネントを経由してデータをやり取りするソフトウェアであっても、各コンポーネント間の繋がりを理解しやすく可視化するソフトウェア構造可視化装置を提供することを目的とする。 Accordingly, the present invention provides a software structure visualization device that makes it easy to understand the connection between components even when the components exchange data via specific components that handle common data. With the goal.
本発明におけるソフトウェア構造可視化装置は、ソフトウェアの構文を解析する構文解析部と、前記構文解析部によって解析された前記構文の解析結果を基に前記ソフトウェアの構造を認識するソフトウェア構造認識部と、前記ソフトウェア構造認識部によって認識された前記構造と前記ソフトウェアの命名規則を基に前記構造で使用される複数のI/Fを関連付けるI/F関連付け部と、前記I/F関連付け部によって関連付けられた複数のI/Fを1つのI/Fに置き換えて前記構造を変換する構造変換部と、前記構造変換部によって変換された前記構造の情報を提示する構造情報提示部とを備える。 The software structure visualization device according to the present invention includes a syntax analysis unit that analyzes software syntax, a software structure recognition unit that recognizes the structure of the software based on an analysis result of the syntax analyzed by the syntax analysis unit, An I / F association unit that associates a plurality of I / Fs used in the structure based on the software naming recognition unit and the structure recognized by the software structure recognition unit, and a plurality of associations by the I / F association unit A structure conversion unit that converts the structure by replacing the I / F with one I / F, and a structure information presentation unit that presents information on the structure converted by the structure conversion unit.
本発明の実施形態によれば、各コンポーネントが共通のデータを扱う特定のコンポーネントを経由してデータをやり取りするソフトウェアであっても、各コンポーネント間の繋がりを理解しやすく可視化するソフトウェア構造可視化装置を提供することができる。 According to the embodiment of the present invention, there is provided a software structure visualization device that makes it easy to understand the connection between components even when the components exchange data via specific components that handle common data. Can be provided.
以下、図面に基づいて本発明の一例である実施の形態を説明する。 Hereinafter, an embodiment which is an example of the present invention will be described with reference to the drawings.
先ず、図1および図2を用いて、ソフトウェア構造可視化装置の構成と動作を説明する。図1は、ソフトウェア構造可視化装置の構成の一例を示すブロック図である。図2は、図1で説明するソフトウェア構造可視化装置の動作の一例を示すフローチャートである。 First, the configuration and operation of the software structure visualization apparatus will be described with reference to FIGS. 1 and 2. FIG. 1 is a block diagram illustrating an example of the configuration of the software structure visualization apparatus. FIG. 2 is a flowchart showing an example of the operation of the software structure visualization apparatus described in FIG.
図1において、ソフトウェア構造可視化装置1は、構文解析部11、ソフトウェア構造認識部12、I/F(Interface)関連付け部13、構造変換部14、および構造情報提示部15の各機能を備える。ソフトウェア構造可視化装置1の各機能は、図2におけるそれぞれのステップ(S1〜S5)における動作を行う。
In FIG. 1, the software structure visualization device 1 includes functions of a syntax analysis unit 11, a software
構文解析部11は、入力されたソースコードの構文を解析する(S1)。ソースコードの構文の解析は、例えば、ソースコードからソフトウェアのコンポーネントを特定する記述を抽出する。コンポーネントとは、ソフトウェアの構成単位であって、例えば、フォルダ、ソースファイル、関数、またはそれらが集合したものである。本実施形態で認識されるコンポーネントは、他のコンポーネントと、変数の参照や関数の呼び出しなどによりデータの授受を行うソフトウェアの構成単位である。構文解析部11は、ソースコードの記述から認識したコンポーネントの解析結果をソフトウェア構造認識部12に出力する。
The syntax analysis unit 11 analyzes the syntax of the input source code (S1). In the analysis of the syntax of the source code, for example, a description specifying a software component is extracted from the source code. A component is a unit of software, and is, for example, a folder, a source file, a function, or a collection of them. The component recognized in the present embodiment is a software component unit that exchanges data with other components by referring to variables, calling functions, and the like. The syntax analysis unit 11 outputs the analysis result of the component recognized from the description of the source code to the software
ソフトウェア構造認識部12は、構文解析部11から入力されたソースコードの解析結果からソフトウェアの構造を認識する(S2)。ソフトウェアの構造の認識とは、コンポーネントと他のコンポーネントのデータやり取りによる繋がりを認識することである。ソフトウェア構造認識部12は、例えば、一のコンポーネントと他のコンポーネントの間のデータのやり取りのためのI/Fを認識する。ソフトウェア構造認識部12は、認識結果をソフトウェア構造情報として、I/F関連付け部13、および構造変換部14に出力する。
The software
I/F関連付け部13は、ソフトウェア構造認識部12から入力されたソフトウェア構造情報に記述されたI/Fを解析して、同じデータ置き場コンポーネントを経由してデータをやり取りする複数のI/Fを関連付ける(S3)。
The I /
I/Fの解析は、例えば関数の呼び出しや変数の参照を規定した命名規則を参照する。命名規則としては、例えば、車載ソフトウェアプラットフォームの国際規格であるAUTOSAR RTE(Automotive Open System Architecture Runtime Environment:AUTOSARランタイム環境)がある。AUTOSAR RTEは、AUTOSAR RTE上で動作するアプリケーションに対して、規格化された命名規則によって共通の基板ソフトウェア(Basic Software:BSW)を提供する。AUTOSAR RTEは、ハードウェアに依存しないソフトウェア環境を提供することができるため、複数のECUでの共通したソフトウェア開発やソフトウェアの再利用を可能にする。I/F関連付け部13は、命名規則を参照して、ソフトウェア構造情報に記述された命名規則にて関連するI/Fを、関連するI/Fの集合として構造変換部14に出力する。命令規則の代替として、I/Fの名称やI/F同士の関連の情報を利用してもよい。これらは、例えば、ソフトウェアプラットフォームにおいてI/Fを定義するコンフィグ情報によって提供される。コンフィグ情報は、例えばXML(Extensible Mark up Language)によって記述されて提供されてもよい。
The I / F analysis refers to, for example, a naming rule that defines function calls and variable references. As a naming rule, for example, there is AUTOSAR RTE (Automotive Open System Architecture Runtime Environment) which is an international standard of an in-vehicle software platform. The AUTOSAR RTE provides common board software (Basic Software: BSW) to applications running on the AUTOSAR RTE by a standardized naming convention. The AUTOSAR RTE can provide a software environment that does not depend on hardware, and thus enables common software development and software reuse in a plurality of ECUs. The I /
ここで、図3を用いて、データ置き場コンポーネントの説明をする。図3は、ソースコード上のコンポーネント間の関係の一例を示す図である。 Here, the data storage component will be described with reference to FIG. FIG. 3 is a diagram illustrating an example of a relationship between components on the source code.
図3において、コンポーネントA101、コンポーネントB102、コンポーネントC103、およびコンポーネントD104は、データ置き場コンポーネント100を共通のデータ置き場として使用する。コンポーネントA101乃至コンポーネントD104は、データ置き場コンポーネント100とデータをやり取りするための命名規則に従ったI/Fによって通信する。I/Fは、例えば、関数呼び出しや変数の参照である。
In FIG. 3, the
例えば、コンポーネントA101からコンポーネントB102にデータの送信を行う場合、AUTOSAR RTEでは、ECU(Electronic Control Unit)を跨いだデータのやり取りを簡略化するためにデータ置き場コンポーネント100を経由する規約を設けている。つまり、コンポーネントA101は、送信するデータを書き込み関数を用いて一旦データ置き場コンポーネント100に書き込む。コンポーネントB102は、データ置き場コンポーネント100に書き込まれたデータを読み込み関数によって読み込む。これにより、コンポーネントA101とコンポーネントB102は、例えば異なったソフトウェアベンダーによって作成される場合でも共通化されたI/Fによりデータの授受が可能となる。
For example, when data is transmitted from the
ソースコードには、データをやり取りするコンポーネント間のI/Fが記述される。上記の例では、コンポーネントA101は書き込み関数でデータ置き場コンポーネント100と繋がり、コンポーネントB102は読み込み関数でデータ置き場コンポーネント100と繋がる。したがって、ソースコードに記述されたI/Fからそのままソフトウェア構造を可視化する従来の技術では、図3に示すとおり、コンポーネントA101乃至コンポーネントD104は、データ置き場コンポーネント100と繋がることは判っても、コンポーネントA101乃至コンポーネントD104の間のやり取りは可視化されない。また、図3に示すソフトウェア構造図は、データ置き場コンポーネントなどのソフトウェアプラットフォームに依存した構造図となる。
The source code describes an I / F between components that exchange data. In the above example, the
再び図1および図2に戻り、I/F関連付け部13は、ソフトウェア構造情報に記述されたI/Fである書き込み関数と読み込み関数を解析して、同じデータ置き場コンポーネントを経由してデータをやり取りするI/Fとして上記二つの関数同士を関連付ける。
1 and 2 again, the I /
次に構造変換部14は、ソフトウェア構造認識部12から入力されたソフトウェア構造情報を、I/F関連付け部13から入力された関連付けられたI/Fの集合に従い、ソフトウェア構造情報を変換する(S4)。構造変換部14は、関連付けられた複数のI/Fを、データの授受等を行うソフトウェアコンポーネントが直接通信する1つのI/Fに置き換え、ソフトウェア構造情報を変換する。構造変換部14は、変換したソフトウェア構造情報を構造情報提示部15に出力する。
Next, the structure converting unit 14 converts the software structure information input from the software
ここで、ソフトウェア構造情報の変換の詳細を、図4および図5を用いて説明する。図4は、図3で説明したコンポーネント間のソースコード上のデータの授受の一例を示す図である。図5は、図3で説明したソースコード上のコンポーネント間の関係を、ソースコード上のデータの授受を直接I/Fに変換した一例を示す図である。 Here, details of the conversion of the software structure information will be described with reference to FIGS. FIG. 4 is a diagram illustrating an example of data exchange on the source code between the components described in FIG. FIG. 5 is a diagram illustrating an example of the relationship between components on the source code described with reference to FIG. 3, in which data exchange on the source code is directly converted into an I / F.
図4において、コンポーネントA101は、I/Fとして命令規則によって定められた関数IF(X)を使用して、データαをデータ置き場コンポーネント100に書き込む。関数IF(X)は例えば"Rte_Write_Port1_α()"と記述される。"Rte_Write_Port1_α()"は、データ置き場1001(Port1)に対して引数としてデータαを書き込む関数である。
In FIG. 4, the
一方、コンポーネントB102は、I/Fとして命令規則によって定められた関数IF(Y)を使用して、データαをデータ置き場コンポーネント100から読み込む。関数IF(Y)は例えば"Rte_Read_Port1_α()"と記述される。"Rte_Read_Port1_α()"は、データ置き場1001(Port1)から引数としてデータαを読み込む関数である。関数IF(X)および関数IF(Y)の2つの関数は、データ置き場1001(Port1)を経由したデータの授受を規定しているため、I/F関連付け部13によって関連付けられる。
On the other hand, the
図5において、コンポーネントA101とコンポーネントB102間の関係は、データ置き場1001、ならびにI/F関連付け部13によって関連付けられた2つの関数である関数IF(X)および関数IF(Y)を用いた関係から、置き換えられた1つの関数である関数IF(Z)を用いた関係に変換される。つまり、構造変換部14は、ソフトウエアの構造を、コンポーネントA101とコンポーネントB102が関数IF(Z)を用いて直接データ授受を行う構造に変換する。
In FIG. 5, the relationship between the
再び図1および図2に戻り、構造情報提示部15は、構造変換部14から入力された変換後のソフトウエアの構造の情報であるソフトウェア構造情報からDSM(Dependency Structure Matrix)とソフトウェア構造図を出力して、ソフトウェアコンポーネントと、ソフトウェアコンポーネント間のI/Fを図示する(S5)。
Referring back to FIGS. 1 and 2 again, the structure
DSMは、ソフトウェアコンポーネント間の依存関係をマトリックスで表したものである。DSMによって、例えば、コンポーネントA101乃至コンポーネントD104の間の依存関係を可視化することができる。ソフトウェアコンポーネント間の依存関係の可視化により、ソフトウェア設計者は、ソフトウェアコンポーネントの構造の理解と保守とを容易に行うことが可能となる。
The DSM is a matrix that shows the dependency between software components. For example, the dependency relationship between the
次に、図6を用いて、ソフトウェア構造図の詳細を説明する。図6は、構造情報提示部15によって図示されるコンポーネント間の関係の一例を示す図である。
Next, details of the software structure diagram will be described with reference to FIG. FIG. 6 is a diagram illustrating an example of a relationship between components illustrated by the structure
図6において、コンポーネントA101とコンポーネントC103は、コンポーネントB102のみと直接データのやり取り行うことが図示される。また、コンポーネントD104は、コンポーネントB102のみと直接データのやり取りを行うことが図示される。図6で図示するソフトウェア構造図は、データ置き場となるコンポーネント等が省略されたソフトウェア構造図となるため、ソフトウェアプラットフォームに依存しない構造図となる。従って、ソフトウェア設計者がソフトウェアを設計した際に考えたコンポーネント間のデータの授受を可視化することができる。ソフトウェア設計者は、可視化されたソフトウェア構造図によって、コンポーネントの構造の理解と保守とを容易に行うことが可能となる。
FIG. 6 illustrates that the
ソフトウェア構造図の図示は、例えば、図示しない液晶ディスプレイ等の表示装置に表示して図示することができる。また、図示しない印字装置に印字して図示することができる。 The software structure diagram can be displayed on a display device such as a liquid crystal display (not shown). Further, it can be printed on a printing device (not shown) and illustrated.
なお、ソフトウェア構造可視化装置1の、構文解析部11、ソフトウェア構造認識部12、I/F関連付け部13、構造変換部14、および構造情報提示部15の一または複数の各機能は、例えば図示しないコンピュータの記憶部に記憶されてCPUによって実行されるプログラムによって実現することができる。また、ソフトウェア構造可視化装置1の一または複数の各機能は、ハードウェアまたはミドルウエアによって実現することもできる。
Note that one or more functions of the syntax analysis unit 11, the software
以上、本発明を実施するための形態について詳述したが、本発明は斯かる特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。 As mentioned above, although the form for implementing this invention was explained in full detail, this invention is not limited to such specific embodiment, In the range of the summary of this invention described in the claim, Various modifications and changes are possible.
1 ソフトウェア構造可視化装置
11 構文解析部
12 ソフトウェア構造認識部
13 I/F関連付け部
14 構造変換部
15 構造情報提示部
100 データ置き場コンポーネント
101 コンポーネントA
102 コンポーネントB
103 コンポーネントC
104 コンポーネントD
1001 データ置き場
DESCRIPTION OF SYMBOLS 1 Software structure visualization apparatus 11
102 Component B
103 Component C
104 Component D
1001 Data storage
Claims (1)
前記構文解析部によって解析された前記構文の解析結果を基に前記ソフトウェアの構造を認識するソフトウェア構造認識部と、
前記ソフトウェア構造認識部によって認識された前記構造と前記ソフトウェアの命名規則を基に前記構造で使用される複数のI/Fを関連付けるI/F関連付け部と、
前記I/F関連付け部によって関連付けられた複数のI/Fを1つのI/Fに置き換えて前記構造を変換する構造変換部と、
前記構造変換部によって変換された前記構造の情報を提示する構造情報提示部と
を備える、ソフトウェア構造可視化装置。 A parser that analyzes the syntax of the software;
A software structure recognition unit for recognizing the structure of the software based on the analysis result of the syntax analyzed by the syntax analysis unit;
An I / F association unit that associates the structure recognized by the software structure recognition unit with a plurality of I / Fs used in the structure based on a naming rule of the software;
A structure conversion unit that converts the structure by replacing a plurality of I / Fs associated by the I / F association unit with one I / F;
A software structure visualization device comprising: a structure information presentation unit that presents information on the structure converted by the structure conversion unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014009016A JP2015138356A (en) | 2014-01-21 | 2014-01-21 | Software structure visualization device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014009016A JP2015138356A (en) | 2014-01-21 | 2014-01-21 | Software structure visualization device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2015138356A true JP2015138356A (en) | 2015-07-30 |
Family
ID=53769323
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014009016A Pending JP2015138356A (en) | 2014-01-21 | 2014-01-21 | Software structure visualization device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2015138356A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017141893A1 (en) * | 2016-02-17 | 2017-08-24 | 三菱電機株式会社 | Software analysis apparatus and software analysis method |
US10606571B2 (en) | 2016-04-26 | 2020-03-31 | Mitsubishi Electric Corporation | Dependence relationship extraction apparatus and computer readable medium |
-
2014
- 2014-01-21 JP JP2014009016A patent/JP2015138356A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017141893A1 (en) * | 2016-02-17 | 2017-08-24 | 三菱電機株式会社 | Software analysis apparatus and software analysis method |
JPWO2017141893A1 (en) * | 2016-02-17 | 2018-04-26 | 三菱電機株式会社 | Software analysis apparatus and software analysis method |
US10606571B2 (en) | 2016-04-26 | 2020-03-31 | Mitsubishi Electric Corporation | Dependence relationship extraction apparatus and computer readable medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9311436B2 (en) | Using an element in a first model to call a portion of a second model | |
JP5679989B2 (en) | Debug pipeline | |
US8448130B1 (en) | Auto-generated code validation | |
US8434062B2 (en) | Enhancing source code debugging and readability using visual symbols | |
CN104756086B (en) | System and method for debugging the language depending on field | |
CN106547681B (en) | Method and device for testing data automatic loading and multiplexing simulation service | |
US20170123764A1 (en) | Method for operating tool in working environment and machine using such method | |
WO2010091623A1 (en) | Apparatus and method for dynamically generating application program interface | |
US9934004B1 (en) | Optimization identification | |
CN103853535B (en) | The method and apparatus for changing middleware | |
US20170286040A1 (en) | Display and operating unit and method of operating a field instrument having a display and operating unit | |
CN100489777C (en) | Intelligent platform management interface firmware architecture and method of building the same | |
US8584080B2 (en) | Modeling and generating computer software product line variants | |
CN111797020A (en) | Mock data method and device based on dynamic bytecode | |
CN111078217A (en) | Brain graph generation method, apparatus and computer-readable storage medium | |
JP2015138356A (en) | Software structure visualization device | |
US10606569B2 (en) | Declarative configuration elements | |
TW201324347A (en) | System and method for managing commands of function module | |
US8949167B2 (en) | Method and device for the quality analysis of system models | |
WO2012049816A1 (en) | Model checking device, method, and program | |
JP2013235508A (en) | Object-oriented program generation device, method therefor, and program | |
JP2012048329A (en) | Object oriented program generating device, method therefor and program | |
CN111782180A (en) | Page generation method and device, electronic equipment and storage medium | |
US20130332123A1 (en) | Model element characteristic preservation in modeling environments | |
JP7163879B2 (en) | Dataflow generator, its method, and its program |