JP2016042317A - Software design support device, and method - Google Patents

Software design support device, and method Download PDF

Info

Publication number
JP2016042317A
JP2016042317A JP2014166325A JP2014166325A JP2016042317A JP 2016042317 A JP2016042317 A JP 2016042317A JP 2014166325 A JP2014166325 A JP 2014166325A JP 2014166325 A JP2014166325 A JP 2014166325A JP 2016042317 A JP2016042317 A JP 2016042317A
Authority
JP
Japan
Prior art keywords
model
software
subsystem
refactoring
requirement
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
JP2014166325A
Other languages
Japanese (ja)
Inventor
宏一 仁科
Koichi Nishina
宏一 仁科
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.)
Panasonic Intellectual Property Management Co Ltd
Original Assignee
Panasonic Intellectual Property Management Co 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 Panasonic Intellectual Property Management Co Ltd filed Critical Panasonic Intellectual Property Management Co Ltd
Priority to JP2014166325A priority Critical patent/JP2016042317A/en
Publication of JP2016042317A publication Critical patent/JP2016042317A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a software design support device and method for automatically performing the refactoring used for summarizing software requirements in model base development.SOLUTION: An analysis is made by a trace analysis unit 13 as to which portion of a model is assigned a requirement on the basis of a model data storage unit 11 in which a model designed in model base development is stored and a software requirement storage unit 12. Refactoring is carried out by a refactoring execution unit 15 on the basis of the result of analysis and an analysis requirement input unit 14 that designates the requirement to be focused on in the refactoring. A simulation is carried out by a simulation execution and result comparison unit 17 on the basis of the result of refactoring, the model present in the model data storage unit 11, and the input data held in a simulation input storage unit 16, and, after confirmation that the result does not have a difference, the portion altered by the refactoring is highlighted by a result display unit 18.SELECTED DRAWING: Figure 1

Description

本発明はソフトウェアのモデルベース開発におけるソフトウェア要件を集約するためのリファクタリングに関するものである。   The present invention relates to refactoring to aggregate software requirements in model-based development of software.

ソフトウェアの複雑化、開発期間の短縮化に伴い、再利用性や保守性を考慮したソフトウェア設計を行うことはますます重要となっている。このソフトウェア設計で有用な手法として、シミュレーション可能なモデルで設計を行うモデルベース開発がある。モデルベース開発ではたとえばSimulink(登録商標)を用いる。   As software becomes more complex and development time is shortened, it is becoming increasingly important to design software with consideration for reusability and maintainability. A useful method for this software design is model-based development in which design is performed using a model that can be simulated. In model-based development, for example, Simulink (registered trademark) is used.

Simulink(登録商標)での設計では、処理が定められたブロックと、ブロック間をつなぐ信号線によりモデルを記述する。また一般に、モデルは階層構造で記述し、機能単位でブロック群をサブシステムとしてまとめていく。ソースコードで例えるならば、ブロックは1行のコード、サブシステムは関数に相当する。   In the design in Simulink (registered trademark), a model is described by a block for which processing is defined and a signal line connecting the blocks. In general, a model is described in a hierarchical structure, and block groups are grouped as subsystems in functional units. For example, in the source code, a block corresponds to one line of code, and a subsystem corresponds to a function.

モデルベース開発では、従来、シミュレーションにより不具合の可能性が高いところを強調表示するなどのモデル検証装置が特許文献1に提案されている。このようなモデル検証装置の動作を以下に示す。   In model-based development, Japanese Patent Application Laid-Open No. 2004-133867 has proposed a model verification apparatus that highlights a place where a possibility of a failure is high by simulation. The operation of such a model verification apparatus is shown below.

図7はモデル検証装置の比較処理についてのフローチャートである。図7において、モデル検証装置は、比較モデルを読み込み(S405、S410)、基準モデルにおけるブロックと、比較モデルにおけるブロックを順次実行する(S415)。そして、同一のブロックにて得られた演算結果の差分を算出すると共に、基準モデル(或いは比較モデル)を構成する各ブロックを表示し、これらのブロックのうち、差分が許容範囲を超えたブロックの強調表示を行う(S425)。   FIG. 7 is a flowchart of the comparison process of the model verification apparatus. In FIG. 7, the model verification apparatus reads the comparison model (S405, S410), and sequentially executes the block in the reference model and the block in the comparison model (S415). And while calculating the difference of the calculation result obtained in the same block, each block which comprises a reference | standard model (or comparison model) is displayed, Of these blocks, the difference of the block where the difference exceeded the tolerance | permissible_range Highlighting is performed (S425).

特開2012−198804号公報JP 2012-198404 A

従来の技術におけるモデル検証装置は、差分が許容範囲を超えたブロックに対し強調表示を行うことで、不具合原因の特定を行っている。それ以外にも、従来の技術では一般に、コード、テストとの紐付けに焦点が当てられ、不具合のあるモデルのブロックを強調表示することで設計変更の支援が行われているのみである。従って、自動での設計変更、特にソフトウェア要件をベースにした自動設計変更については行われていない。   The model verification apparatus in the prior art identifies the cause of the defect by highlighting the block whose difference exceeds the allowable range. In addition, the conventional technology generally focuses on linking with codes and tests, and only supports design changes by highlighting blocks of defective models. Therefore, automatic design changes, particularly automatic design changes based on software requirements have not been made.

また、設計によっては、関連するソフトウェア要件が複数のサブシステムに分散して割り当てられている場合がある。関連するソフトウェア要件は1つのサブシステムに集約され、ソフトウェア要件に対する凝集度が高いことが望ましい。また、設計の見直しによって、サブシステムを修正する場合がある。例えば、機能安全規格ISO26262の対応などの場合で、この際も安全に対するソフトウェア要件を割り当てるサブシステムを集約させることが望ましい。   Also, depending on the design, related software requirements may be distributed and assigned to multiple subsystems. It is desirable that the associated software requirements are aggregated into one subsystem and that the degree of aggregation for the software requirements is high. In addition, the subsystem may be corrected by reviewing the design. For example, in the case of compliance with the functional safety standard ISO26262, it is desirable to consolidate subsystems that assign software requirements for safety.

そこで本発明は、ソフトウェア要件を集約するためのリファクタリングを自動で行うソフトウェア設計支援装置、および方法を提供することを目的とするものである。   Accordingly, an object of the present invention is to provide a software design support apparatus and method that automatically perform refactoring for aggregating software requirements.

上記目的を解決するために本発明は、モデルベース開発における、既存モデルをソフトウェア要件に従ってリファクタリングを行うソフトウェア設計支援装置であって、前記モデルのサブシステムと前記ソフトウェア要件の紐付け情報から、どの前記サブシステムがどの前記ソフトウェア要件にかかわっているかを分析するトレース分析部と、入力として指定された複数の前記ソフトウェア要件を元にリファクタリング対象の前記モデルの前記サブシステムを展開し、ブロック間の依存関係から指定された前記ソフトウェア要件が割り当てられた前記ブロックのサブセットを分析し、前記サブセットから前記モデルの前記サブシステムを変更するリファクタリング実行部と、前記リファクタリングの前後における前記モデルのシミュレーションを実行し、実行結果を比較する、シミュレーション実行及び結果比較部と、前記ソフトウェア要件が割り当てられた前記ブロックと、前記リファクタリングによって変更した前記サブシステムと、シミュレーション結果の差分と、を表示する結果表示部と、を備えるものである。   In order to solve the above-described object, the present invention provides a software design support apparatus for refactoring an existing model in accordance with software requirements in model-based development, which is based on information associated with the model subsystem and the software requirements. Trace analysis unit that analyzes which software requirement the subsystem is involved in, and expands the subsystem of the model to be refactored based on a plurality of the software requirements specified as input, and the dependency relationship between blocks A refactoring executor for analyzing the subset of the blocks to which the software requirements specified by the method are assigned and changing the subsystem of the model from the subset; and simulating the model before and after the refactoring Result display for displaying the simulation execution and result comparison unit, the block to which the software requirement is assigned, the subsystem changed by the refactoring, and the difference of the simulation result A section.

また、本発明は、モデルベース開発における、既存モデルをソフトウェア要件に従ってリファクタリングを行うソフトウェア設計支援方法であって、前記モデルのサブシステムと前記ソフトウェア要件の紐付け情報から、どの前記サブシステムがどの前記ソフトウェア要件にかかわっているかをトレース分析する過程と、入力として指定された複数の前記ソフトウェア要件を元にリファクタリング対象の前記モデルの前記サブシステムを展開し、ブロック間の依存関係から指定された前記ソフトウェア要件が割り当てられた前記ブロックのサブセットを分析し、前記サブセットから前記モデルの前記サブシステムを変更することにより前記リファクタリングを実行する過程と、前記リファクタリングの前後における前記モデルのシミュレーションを実行し、実行結果を比較する過程と、前記ソフトウェア要件が割り当てられた前記ブロックと、前記リファクタリングによって変更した前記サブシステムと、シミュレーション結果の差分と、を表示する過程と、を含むものである。   The present invention is also a software design support method for refactoring an existing model in accordance with software requirements in model-based development, wherein from the model subsystem and the software requirement linking information, which subsystem is which Trace analysis of whether software requirements are involved, and expand the subsystem of the model to be refactored based on a plurality of the software requirements specified as inputs, and the software specified from the dependency between blocks Analyzing the subset of blocks to which requirements have been assigned, performing the refactoring by changing the subsystem of the model from the subset, and simulating the model before and after the refactoring Running down the steps of comparing the execution result, and the block in which the software requirement is allocated, is intended to include said subsystem changed by the refactoring, the simulation results difference, the method comprising: displaying a, a.

本発明のソフトウェア設計支援装置、および方法は、入力したソフトウェア要件に紐づくブロックのサブセットを分析することにより、自動でモデルのリファクタリングを行うことができる。従って、入力したソフトウェア要件が自動的に集約され、凝集度が高いモデル設計を得ることができるという効果を奏するものである。   The software design support apparatus and method according to the present invention can automatically refactor a model by analyzing a subset of blocks associated with an input software requirement. Therefore, the input software requirements are automatically aggregated, and it is possible to obtain a model design with a high degree of cohesion.

本発明の実施の形態1におけるソフトウェア設計支援装置の概略ブロック図Schematic block diagram of a software design support apparatus in Embodiment 1 of the present invention 本発明の実施の形態1におけるソフトウェア設計支援装置の動作説明のためのフローチャートFlowchart for explaining the operation of the software design support apparatus according to Embodiment 1 of the present invention. 本発明の実施の形態1におけるソフトウェア設計支援装置のリファクタリング動作前のモデル図Model diagram before refactoring operation of software design support apparatus in Embodiment 1 of the present invention 本発明の実施の形態1におけるソフトウェア設計支援装置の探索木による分析例を示す図The figure which shows the example of an analysis by the search tree of the software design support apparatus in Embodiment 1 of this invention 本発明の実施の形態1におけるソフトウェア設計支援装置の探索動作を示すフローチャートThe flowchart which shows the search operation | movement of the software design support apparatus in Embodiment 1 of this invention. 本発明の実施の形態1におけるソフトウェア設計支援装置のリファクタリング動作後のモデル図Model diagram after refactoring operation of software design support apparatus in Embodiment 1 of the present invention 従来のモデル検証装置の比較処理についてのフローチャートFlow chart for comparison processing of a conventional model verification device

以下、本発明におけるソフトウェア設計支援装置、および方法について図面を参照しながら説明する。   Hereinafter, a software design support apparatus and method according to the present invention will be described with reference to the drawings.

(実施の形態1)
図1は本実施の形態1におけるソフトウェア設計支援装置の概略ブロック図である。図2は、本発明の実施の形態1におけるソフトウェア設計支援装置の動作説明のためのフローチャートである。図3は、本発明の実施の形態1におけるソフトウェア設計支援装置のリファクタリング動作前のモデル図である。図4は、本発明の実施の形態1におけるソフトウェア設計支援装置の探索木による分析例を示す図である。図5は、本発明の実施の形態1におけるソフトウェア設計支援装置の探索動作を示すフローチャートである。図6は、本発明の実施の形態1におけるソフトウェア設計支援装置のリファクタリング実行後のモデル図である。
(Embodiment 1)
FIG. 1 is a schematic block diagram of a software design support apparatus according to the first embodiment. FIG. 2 is a flowchart for explaining the operation of the software design support apparatus according to Embodiment 1 of the present invention. FIG. 3 is a model diagram before the refactoring operation of the software design support apparatus according to Embodiment 1 of the present invention. FIG. 4 is a diagram showing an analysis example using a search tree of the software design support apparatus according to Embodiment 1 of the present invention. FIG. 5 is a flowchart showing the search operation of the software design support apparatus according to Embodiment 1 of the present invention. FIG. 6 is a model diagram after execution of refactoring of the software design support apparatus according to Embodiment 1 of the present invention.

図1において、ソフトウェア設計支援装置1は、モデルのサブシステムとソフトウェア要件の紐付け情報から、どの前記サブシステムがどの前記ソフトウェア要件にかかわっているかを分析するトレース分析部13と、入力として指定された複数の前記ソフトウェア要件を元にリファクタリング対象の前記モデルの前記サブシステムを展開し、ブロック間の依存関係から指定された前記ソフトウェア要件が割り当てられた前記ブロックのサブセットを分析し、前記サブセットから前記モデルの前記サブシステムを変更するリファクタリング実行部15と、前記リファクタリングの前後における前記モデルのシミュレーションを実行し、実行結果を比較する、シミュレーション実行及び結果比較部17と、前記ソフトウェア要件が割り当てられた前記ブロックと、前記リファクタリングによって変更した前記サブシステムと、シミュレーション結果の差分と、を表示する結果表示部18と、を備える。   In FIG. 1, the software design support apparatus 1 is designated as an input and a trace analysis unit 13 that analyzes which subsystem is related to which software requirement from the association information of the model subsystem and software requirement. Expanding the subsystem of the model to be refactored based on a plurality of the software requirements, analyzing a subset of the blocks to which the software requirement specified from the dependency between blocks is assigned, and from the subset The software requirements are assigned to a refactoring execution unit 15 that changes the subsystem of the model, a simulation execution and result comparison unit 17 that executes a simulation of the model before and after the refactoring, and compares execution results. Comprising a said block, said sub-system has been changed by the refactoring, the simulation results difference, the result display unit 18 for displaying the.

これにより、入力したソフトウェア要件に紐づくブロックのサブセットを分析することで、自動的にモデルのリファクタリングを行うことができる。従って、入力したソフトウェア要件が自動的に集約され、凝集度が高いモデル設計を得ることができる。   Thus, the model can be automatically refactored by analyzing a subset of blocks associated with the input software requirements. Therefore, the input software requirements are automatically aggregated, and a model design with a high degree of cohesion can be obtained.

以下、より具体的に本実施の形態1の構成、動作について説明する。   Hereinafter, the configuration and operation of the first embodiment will be described more specifically.

図1において、モデルベース開発で設計したモデルは、モデルデータ記憶部11に記録されている。また、ソフトウェア要件記憶部12には、ソフトウェア要件が記憶されている。従って、両者から、トレース分析部13は、モデルのどの部分にソフトウェア要件が割り当てられているかを分析する。一方、リファクタリングで着目するソフトウェア要件については、分析要件入力部14によりユーザが指定する。   In FIG. 1, a model designed by model-based development is recorded in the model data storage unit 11. The software requirement storage unit 12 stores software requirements. Therefore, from both, the trace analysis unit 13 analyzes to which part of the model the software requirement is assigned. On the other hand, the software requirement to be focused on by refactoring is designated by the user through the analysis requirement input unit 14.

こうして、入力されたソフトウェア要件と、トレース分析部13による分析結果を用いて、リファクタリング実行部15がリファクタリングを実施する。このリファクタリングの結果と、モデルデータ記憶部11にあるモデルと、シミュレーション入力記憶部16に保持される入力データと、から、シミュレーションを、シミュレーション実行及び結果比較部17で実施する。そして、リファクタリング前後で、シミュレーション結果に差分がないことを確認した上で、結果表示部18が、リファクタリングによる変更したサブシステムを強調表示する。また、結果表示部18は、ソフトウェア要件が割り当てられたブロックと、シミュレーション結果の差分も表示する。   In this way, the refactoring execution unit 15 performs refactoring using the input software requirements and the analysis result by the trace analysis unit 13. A simulation is executed by the simulation execution and result comparison unit 17 from the result of the refactoring, the model in the model data storage unit 11, and the input data held in the simulation input storage unit 16. Then, after confirming that there is no difference in the simulation result before and after refactoring, the result display unit 18 highlights the subsystem changed by refactoring. In addition, the result display unit 18 also displays the difference between the simulation result and the block to which the software requirement is assigned.

なお、図1におけるモデルデータ記憶部11、ソフトウェア要件記憶部12、およびシミュレーション入力記憶部16は、たとえばハードディスクやメモリからなる記憶装置で構成される。分析要件入力部14は、たとえばキーボードで構成される。結果表示部18は、たとえばカラーディスプレイで構成される。そして、トレース分析部13、リファクタリング実行部15、および、シミュレーション実行及び結果比較部17は、以下に説明する図2、図5のソフトウェアの一部で実現される。   Note that the model data storage unit 11, the software requirement storage unit 12, and the simulation input storage unit 16 in FIG. 1 are configured by a storage device such as a hard disk or a memory. The analysis requirement input unit 14 is configured with a keyboard, for example. The result display unit 18 is configured by a color display, for example. The trace analysis unit 13, the refactoring execution unit 15, and the simulation execution and result comparison unit 17 are realized by a part of software shown in FIGS. 2 and 5 described below.

図2は、ソフトウェア設計支援装置1の動作説明のためのフローチャートの一例である。なお、このフローチャートはソフトウェア設計支援装置1に含まれる図示しない演算部によって実行される。   FIG. 2 is an example of a flowchart for explaining the operation of the software design support apparatus 1. This flowchart is executed by a calculation unit (not shown) included in the software design support apparatus 1.

図2のフローチャートが実行されると、前記演算部は、まず、ステップS1でリファクタリング対象とする現状のモデル(以下、ベースモデルという)のファイルを読み込む。次に、ステップS2では、前記演算部はソフトウェア要件とベースモデルとの紐付け情報を読み込む。そして、前記演算部はステップS3で、ステップS1、S2の入力から、ベースモデルの階層構造にあわせたソフトウェア要件の検索木を作成する。図3はリファクタリング動作前のベースモデルの例を示す図である。図4は図3のベースモデルから作成した検索木による分析例を示す図である。   When the flowchart of FIG. 2 is executed, the arithmetic unit first reads a file of a current model (hereinafter referred to as a base model) to be refactored in step S1. Next, in step S2, the calculation unit reads the association information between the software requirement and the base model. In step S3, the calculation unit creates a software requirement search tree in accordance with the hierarchical structure of the base model from the inputs in steps S1 and S2. FIG. 3 is a diagram illustrating an example of the base model before the refactoring operation. FIG. 4 is a diagram illustrating an analysis example using a search tree created from the base model of FIG.

まず、図3に示したモデルには5つのサブシステムM1〜M5が含まれる。またサブシステムM1の下にはさらにサブシステムM11、M12が含まれる階層構造となっている。同様にサブシステムM2〜M5の下位にもサブシステムがある。   First, the model shown in FIG. 3 includes five subsystems M1 to M5. Further, the sub-system M1 has a hierarchical structure including sub-systems M11 and M12. Similarly, there are subsystems below the subsystems M2 to M5.

次に、図4に示す検索木において、図3のサブシステムM1が図4のノードD1に相当し、サブシステムM11がノードD11、サブシステムM12がノードD12に相当する。サブシステムM2〜M5も同様にベースモデル中のサブシステムが、検索木のノードとして表される。下位のサブシステムには紐付け情報よりソフトウェア要件と紐付けられ、上位のサブシステムには下位のサブシステムがもつソフトウェア要件全てが紐付けられる。   Next, in the search tree shown in FIG. 4, the subsystem M1 in FIG. 3 corresponds to the node D1 in FIG. 4, the subsystem M11 corresponds to the node D11, and the subsystem M12 corresponds to the node D12. Similarly, in the subsystems M2 to M5, the subsystems in the base model are represented as nodes of the search tree. The lower subsystem is associated with software requirements from the association information, and the upper subsystem is associated with all the software requirements of the lower subsystem.

上記したステップS1〜S3までの動作は、モデルのサブシステムとソフトウェア要件の紐付け情報から、どのサブシステムがどのソフトウェア要件にかかわっているかを分析するトレース分析部13の動作に相当する。   The operations from step S1 to S3 described above correspond to the operation of the trace analysis unit 13 that analyzes which subsystem is related to which software requirement from the association information of the model subsystem and the software requirement.

ここで、図2に戻り、前記演算部は、ステップS4でリファクタリングにおいて着目するソフトウェア要件(以下、基準要件という)を分析要件入力部14からの入力として受け取る。次に、前記演算部は、ステップS5で、ステップS3の結果である検索木から、ステップS4で入力された基準要件が割り当てられたサブシステムを分析し、依存関係を検索するリスト(以下、検索対象リストという)に追加する。   Here, referring back to FIG. 2, the arithmetic unit receives, as input from the analysis requirement input unit 14, a software requirement (hereinafter referred to as a reference requirement) focused on in refactoring in step S <b> 4. Next, in step S5, the calculation unit analyzes the subsystem to which the reference requirement input in step S4 is assigned from the search tree that is the result of step S3, and searches for a dependency (hereinafter referred to as search). To the target list).

たとえばステップS4で、基準要件として要件X13、X32、X41を指定したとすると、前記演算部は、図4に示した検索木からそれぞれサブシステムA2、C2、D1に割り当てられていると判断する。そして検索対象リストには、3つのサブシステムA2、C2、D1が追加される。   For example, if the requirements X13, X32, and X41 are designated as the standard requirements in step S4, the calculation unit determines that they are assigned to the subsystems A2, C2, and D1, respectively, from the search tree shown in FIG. Then, three subsystems A2, C2, and D1 are added to the search target list.

次に、前記演算部は、ステップS6、S7でサブシステムの依存関係をたどり、基準要件に関係するサブシステムのサブセットを分析する。ステップS6では検索対象リストに追加したサブシステムに対し出力(前)方向に依存関係をたどる。対して、ステップS7では検索対象リストに追加したサブシステムに対し入力(後)方向に依存関係をたどる。図4は、モデルの依存関係を辿るイメージも示している。   Next, the calculation unit traces the dependency relationship of the subsystem in steps S6 and S7, and analyzes the subset of the subsystem related to the reference requirement. In step S6, the dependency relation in the output (previous) direction is traced to the subsystem added to the search target list. On the other hand, in step S7, the dependency relation in the input (rear) direction is traced to the subsystem added to the search target list. FIG. 4 also shows an image of tracing the model dependency.

図5は、ステップS6のサブセット分析方法を説明するためのフローチャートである。   FIG. 5 is a flowchart for explaining the subset analysis method in step S6.

まず、ステップS61で、前記演算部は、検索対象リストの中からサブシステム(以下、選択ブロックという)を1つ選択する。このとき、シミュレーションの実行順序を分析し、実行順序が最後のものを選択すると効率がよい。次に、ステップS62で、前記演算部は、選択ブロックの入力に当たる信号線をたどり、選択ブロックの入力となるサブシステム(以下、入力ブロックという)を検出する。   First, in step S61, the calculation unit selects one subsystem (hereinafter referred to as a selected block) from the search target list. At this time, it is efficient to analyze the simulation execution order and select the last execution order. Next, in step S62, the arithmetic unit traces a signal line corresponding to the input of the selected block, and detects a subsystem (hereinafter referred to as an input block) that is an input of the selected block.

次に、ステップS63で、前記演算部は、入力ブロックからさらに辿るブロックがあるかどうかを判断する。選択ブロックの入力ブロックがない(モデルの外から入力を受け取る)場合、選択ブロックから入力を辿ることを終了する。このとき、シミュレーションの実行順序を分析し、入力ブロックの実行順序が、検索対象リストに追加したいずれのブロックよりも前に実行される場合、入力を辿ることを終了条件に変えると効率がよい。   Next, in step S63, the calculation unit determines whether there is a block further traced from the input block. When there is no input block for the selected block (input is received from outside the model), tracing the input from the selected block is terminated. At this time, the simulation execution order is analyzed, and when the execution order of the input blocks is executed before any of the blocks added to the search target list, it is efficient to change the input trace to the end condition.

ステップS63で、入力を辿ることを継続すると判断した場合(S63のNo)、前記演算部は、ステップS64で選択ブロックを入力方向から辿ったブロックのサブセット(以下、後方向サブセットという)に登録する。次に、前記演算部は、ステップS65で、入力ブロックを新しい選択ブロックとして設定する。以降、前記演算部は、ステップS62からS65を繰り返す。   If it is determined in step S63 that the input is continued (No in S63), the calculation unit registers the selected block in the subset of the block traced from the input direction in step S64 (hereinafter referred to as a backward subset). . Next, in step S65, the calculation unit sets the input block as a new selection block. Thereafter, the calculation unit repeats steps S62 to S65.

一方、ステップS63で入力を辿ることを終了すると判断した場合(S63のYes)、前記演算部は、ステップS66で後方向サブセットに含まれるサブシステムを、検索対象リストから除外する。そして、前記演算部は、ステップS67で検索対象リストが空であるかを確認する。検索対象リストが空でない場合(S67のNo)、前記演算部は、S61から処理を繰り返し、検索対象リストが空である場合(S67のYes)は、分析を終了する。   On the other hand, if it is determined in step S63 that tracing the input is to be terminated (Yes in S63), the calculation unit excludes the subsystem included in the backward subset from the search target list in step S66. Then, in step S67, the calculation unit confirms whether the search target list is empty. When the search target list is not empty (No in S67), the calculation unit repeats the process from S61, and when the search target list is empty (Yes in S67), the analysis ends.

図2のステップS7でも、前記演算部は、ステップS6と同様に分析する。ステップS7の場合、前記演算部は、出力方向にサブシステムを辿りサブセット(以下、前方向サブセットという)を抽出する。また検索対象リストは、ステップS6とステップS7とで独立に保持する。そして、ステップS66で除外されるサブシステムは、ステップS6で使用する検索対象リストに関係し、ステップS7の検索対象リストとは関係しない。   Also in step S7 of FIG. 2, the calculation unit analyzes in the same manner as in step S6. In the case of step S7, the arithmetic unit follows the subsystem in the output direction and extracts a subset (hereinafter referred to as a forward subset). The search target list is held independently at step S6 and step S7. The subsystems excluded in step S66 are related to the search target list used in step S6, and are not related to the search target list in step S7.

このような動作から、図3に示したモデルに対するステップS6の結果としては、サブシステムA1、A2、B1、B2、B3、C1、C2、C3、D1が後方向サブセットとして抽出される。同様に、ステップS7の結果としては、サブシステムA2、C1、C2、C3、D1、D2、D3、E1が前方向サブセットとして抽出される。   From such an operation, as a result of step S6 for the model shown in FIG. 3, subsystems A1, A2, B1, B2, B3, C1, C2, C3, and D1 are extracted as backward subsets. Similarly, as a result of step S7, subsystems A2, C1, C2, C3, D1, D2, D3, and E1 are extracted as forward subsets.

ここで、図2に示した動作の説明に戻る。   Here, the description returns to the operation shown in FIG.

ステップS8では、前記演算部は、ステップS6、S7の結果である後方向サブセットおよび前方向サブセットの両方に含まれるサブシステムを抽出する。次に、ステップS9で、前記演算部は、抽出したサブシステムが含まれる上位のサブシステムを展開し、抽出したサブシステム群を新しいサブシステムとしてまとめ直すことで、リファクタリングを実行したモデル(以下、リファクタリングモデルという)を作成する。また変更したサブシステムを記録する。   In step S8, the calculation unit extracts subsystems included in both the backward subset and the forward subset that are the results of steps S6 and S7. Next, in step S9, the arithmetic unit expands a higher-level subsystem including the extracted subsystem, and reorganizes the extracted subsystem group as a new subsystem (hereinafter, referred to as a refactoring model). A refactoring model). Also record the changed subsystem.

ここで、これらの動作の具体例を示す。図3に示したモデルに対する実行結果では後方向サブセットと後方向サブセットの両方に含まれるサブシステムとして、サブシステムA2、C1、C2、C3、D1が抽出される。図6は図3に示したモデルに対するリファクタリング後のモデルの例を示す図である。図3のサブシステムM1、M3、M4が展開され、ステップS8で得られたサブセットをまとめたものが図6のサブシステムR2である。サブシステムR2には基準要件が割り当てられたサブシステムR21、R22、R23が含まれる。サブシステムM1で展開され、サブシステムR2に含まれないサブシステムR1は変更したサブシステムとして記録される。同様にサブシステムM4を展開し、サブシステムR2に含まれないサブシステムR3、R4も変更したサブシステムとして記録される。   Here, specific examples of these operations will be shown. In the execution result for the model shown in FIG. 3, subsystems A2, C1, C2, C3, and D1 are extracted as subsystems included in both the backward subset and the backward subset. FIG. 6 is a diagram illustrating an example of a model after refactoring with respect to the model illustrated in FIG. 3. The subsystems M1, M3, and M4 in FIG. 3 are expanded, and the subsets obtained in step S8 are combined into a subsystem R2 in FIG. Subsystem R2 includes subsystems R21, R22, R23 to which reference requirements are assigned. The subsystem R1 that is expanded in the subsystem M1 and is not included in the subsystem R2 is recorded as a changed subsystem. Similarly, the subsystem M4 is expanded, and subsystems R3 and R4 not included in the subsystem R2 are also recorded as changed subsystems.

以上に述べたステップS4〜S9は、入力として指定された複数のソフトウェア要件を元にリファクタリング対象のモデルのサブシステムを展開し、ブロック間の依存関係から指定されたソフトウェア要件が割り当てられたブロックのサブセットを分析し、サブセットからモデルのサブシステムを変更するリファクタリング実行部15の動作に相当する。   In steps S4 to S9 described above, the subsystem of the model to be refactored is expanded based on a plurality of software requirements designated as inputs, and the blocks designated with the software requirements designated from the dependency between blocks are assigned. This corresponds to the operation of the refactoring execution unit 15 that analyzes the subset and changes the subsystem of the model from the subset.

ステップS10で、前記演算部は、ベースモデルとリファクタリングモデルの両方に対し、同じ入力値を使ってのシミュレーションを実行する。詳細には、前記演算部は、リファクタリングの結果、およびモデルデータ記憶部11にあるモデルと、シミュレーション入力記憶部16に保持された入力データと、から、シミュレーションを実行する。そして、前記演算部は、各実行結果を比較し、出力値が異なる場合があれば、差分情報として記録する。   In step S10, the calculation unit executes a simulation using the same input value for both the base model and the refactoring model. Specifically, the arithmetic unit executes a simulation from the refactoring result, the model in the model data storage unit 11, and the input data held in the simulation input storage unit 16. Then, the arithmetic unit compares the execution results, and records the difference information if the output value is different.

このステップS10は、リファクタリングの前後におけるモデルのシミュレーションを実行し、実行結果を比較する、シミュレーション実行及び結果比較部17の動作に相当する。   This step S10 corresponds to the operation of the simulation execution and result comparison unit 17 that executes simulation of the model before and after refactoring and compares the execution results.

次に、前記演算部は、ステップS11で、ステップS9でのリファクタリング結果とステップS10でのシミュレーション結果を表示する。リファクタリング結果として、前記演算部はベースモデルから変更したサブシステムを強調表示し、基準要件が割り当てられているサブシステムも強調表示する。また、ソフトウェア要件が割り当てられたブロックも表示される。シミュレーション結果として、出力値が異ならない、すなわちシミュレーション結果に差分がない場合、前記演算部はリファクタリングによる不具合混入がないことを示す。出力値が異なる、すなわちシミュレーション結果に差分がある場合は、前記演算部は、その差分と入力値を示す。   Next, in step S11, the calculation unit displays the refactoring result in step S9 and the simulation result in step S10. As a refactoring result, the arithmetic unit highlights the subsystem changed from the base model, and also highlights the subsystem to which the reference requirement is assigned. Also displayed are blocks to which software requirements are assigned. When the output value is not different as the simulation result, that is, when there is no difference in the simulation result, the calculation unit indicates that there is no problem mixing due to refactoring. When the output values are different, that is, when there is a difference in the simulation result, the calculation unit indicates the difference and the input value.

強調表示の具体例としては、図6において、サブシステムR1、R2、R3、R4がリファクタリングによる変更として強調表示される対象である。またサブシステムR21、R22、R23は基準要件が割り当てられたサブシステムとして、変更点とは異なる色を使うなどして区別して、強調表示される。   As a specific example of highlighting, the subsystems R1, R2, R3, and R4 in FIG. 6 are objects that are highlighted as changes due to refactoring. Further, the subsystems R21, R22, and R23 are distinguished and highlighted by using colors different from the changed points as subsystems to which reference requirements are assigned.

このステップS11は、ソフトウェア要件が割り当てられたブロックと、リファクタリングによって変更したサブシステムと、シミュレーション結果の差分と、を表示する結果表示部18の動作に相当する。   This step S11 corresponds to the operation of the result display unit 18 for displaying the block to which the software requirement is assigned, the subsystem changed by the refactoring, and the difference between the simulation results.

以上の構成、動作により、入力したソフトウェア要件に紐づくブロックのサブセットを分析することで、自動的にモデルのリファクタリングを行うことができるので、入力したソフトウェア要件が自動的に集約され、凝集度が高いモデル設計を得ることが可能なソフトウェア設計支援装置1が得られる。   With the above configuration and operation, the model can be automatically refactored by analyzing a subset of the blocks associated with the input software requirements, so the input software requirements are automatically aggregated and the cohesion is reduced. The software design support apparatus 1 capable of obtaining a high model design is obtained.

なお、本実施の形態1では、ソフトウェア設計支援装置1として記載したが、これは、コンピュータが図2や図5のフローチャートを実行することによるソフトウェア設計支援方法であってもよい。   In the first embodiment, the software design support apparatus 1 is described. However, this may be a software design support method in which a computer executes the flowcharts of FIGS. 2 and 5.

すなわち、モデルのサブシステムとソフトウェア要件の紐付け情報から、どの前記サブシステムがどの前記ソフトウェア要件にかかわっているかをトレース分析する過程と、入力として指定された複数の前記ソフトウェア要件を元にリファクタリング対象の前記モデルの前記サブシステムを展開し、ブロック間の依存関係から指定された前記ソフトウェア要件が割り当てられた前記ブロックのサブセットを分析し、前記サブセットから前記モデルの前記サブシステムを変更することにより前記リファクタリングを実行する過程と、前記リファクタリングの前後における前記モデルのシミュレーションを実行し、実行結果を比較する過程と、前記ソフトウェア要件が割り当てられた前記ブロックと、前記リファクタリングによって変更した前記サブシステムと、前記シミュレーション結果の差分と、を表示する過程と、を含むソフトウェア設計支援方法である。この場合も、本実施の形態1と同等の効果が得られる。   That is, a process of performing a trace analysis of which subsystem is related to which software requirement from the association information of the model subsystem and the software requirement, and a refactoring target based on the plurality of software requirements specified as inputs Expanding the subsystem of the model, analyzing a subset of the blocks to which the software requirements specified from the dependencies between the blocks are assigned, and changing the subsystem of the model from the subset A process of performing refactoring, a process of executing simulation of the model before and after the refactoring, comparing execution results, the block to which the software requirements are assigned, and the block changed by the refactoring And blanking system, the method comprising: displaying a a difference between the simulation result, a software design support method comprising. Also in this case, the same effect as in the first embodiment can be obtained.

(実施の形態2)
以下、本発明の実施の形態2について説明する。なお、本実施の形態2において、実施の形態1と同じ構成については同一符号を付し、その詳細な説明を省略する。すなわち、本実施の形態2のソフトウェア設計支援装置1における特徴となる部分は、トレース分析部13が、あらかじめソフトウェア要件と、モデルのブロックおよびサブシステムとの紐付け情報を記録しており、この紐付け情報に変更があった場合のみトレース分析を実行するようにした点である。
(Embodiment 2)
The second embodiment of the present invention will be described below. In the second embodiment, the same components as those in the first embodiment are denoted by the same reference numerals, and detailed description thereof is omitted. That is, the trace analysis unit 13 records in advance the software requirements and the link information between the model block and the subsystem, which is a feature of the software design support apparatus 1 of the second embodiment. The trace analysis is executed only when the attached information is changed.

具体的には、前記演算部がトレース分析部13での分析結果を外部ファイルとして記録しておき、以後、紐付け情報に変更がなければトレース分析をしない。これにより、モデルとソフトウェア要件の検索木の作成を省略することができる。   Specifically, the calculation unit records the analysis result in the trace analysis unit 13 as an external file, and thereafter does not perform the trace analysis unless the association information is changed. This eliminates the need to create a model and software requirement search tree.

換言すると、リファクタリング実行部15で得られるリファクタリング結果をトレース分析部13で保存しておくことで、リファクタリングモデルに対し、新たな基準要件を指定して、リファクタリングを行う場合については、図2に示すフローチャートのステップS1〜S3を省略できる。   In other words, the refactoring result obtained by the refactoring execution unit 15 is stored in the trace analysis unit 13 to specify a new reference requirement for the refactoring model and perform refactoring as shown in FIG. Steps S1 to S3 in the flowchart can be omitted.

このように、本実施の形態2によれば、紐付け情報に変更があった場合のみトレース分析を実行するので、紐付け情報に変更がなければトレース分析を行わない。従って、検索木の作成を省略でき、効率向上が図れる。   As described above, according to the second embodiment, the trace analysis is performed only when there is a change in the association information. Therefore, if there is no change in the association information, the trace analysis is not performed. Therefore, creation of a search tree can be omitted, and efficiency can be improved.

なお、本実施の形態2では、ソフトウェア設計支援装置1として記載したが、これは、ソフトウェア設計支援方法であってもよい。   In the second embodiment, the software design support apparatus 1 is described. However, this may be a software design support method.

すなわち、実施の形態1で述べたソフトウェア設計支援方法において、トレース分析する過程が、あらかじめソフトウェア要件と、モデルのブロックおよびサブシステムとの紐付け情報を記録しており、この紐付け情報に変更があった場合のみ前記トレース分析を実行する過程を含むソフトウェア設計支援方法である。この場合も、本実施の形態2と同等の効果が得られる。   That is, in the software design support method described in the first embodiment, the trace analysis process records the software requirements and the link information between the model block and the subsystem in advance, and the link information is changed. This is a software design support method including a process of executing the trace analysis only when there is. In this case, the same effect as in the second embodiment can be obtained.

本発明にかかるソフトウェア設計支援装置、および方法は、自動的にモデルのリファクタリングを行うことができるので、特に、ソフトウェアのモデルベース開発を行うソフトウェア設計支援装置、および方法等として有用である。   Since the software design support apparatus and method according to the present invention can automatically perform refactoring of a model, it is particularly useful as a software design support apparatus and method for performing model-based development of software.

1 ソフトウェア設計支援装置
13 トレース分析部
15 リファクタリング実行部
17 シミュレーション実行及び結果比較部
18 結果表示部
DESCRIPTION OF SYMBOLS 1 Software design support apparatus 13 Trace analysis part 15 Refactoring execution part 17 Simulation execution and result comparison part 18 Result display part

Claims (4)

モデルベース開発における、既存モデルをソフトウェア要件に従ってリファクタリングを行うソフトウェア設計支援装置であって、
前記モデルのサブシステムと前記ソフトウェア要件の紐付け情報から、どの前記サブシステムがどの前記ソフトウェア要件にかかわっているかを分析するトレース分析部と、
入力として指定された複数の前記ソフトウェア要件を元にリファクタリング対象の前記モデルの前記サブシステムを展開し、ブロック間の依存関係から指定された前記ソフトウェア要件が割り当てられた前記ブロックのサブセットを分析し、前記サブセットから前記モデルの前記サブシステムを変更するリファクタリング実行部と、
前記リファクタリングの前後における前記モデルのシミュレーションを実行し、実行結果を比較する、シミュレーション実行及び結果比較部と、
前記ソフトウェア要件が割り当てられた前記ブロックと、前記リファクタリングによって変更した前記サブシステムと、シミュレーション結果の差分と、を表示する結果表示部と、
を備えることを特徴とするソフトウェア設計支援装置。
A software design support device that refactors an existing model according to software requirements in model-based development,
A trace analysis unit that analyzes which subsystem is related to which software requirement from the association information of the model subsystem and the software requirement;
Expanding the subsystem of the model to be refactored based on a plurality of the software requirements specified as input, and analyzing a subset of the blocks to which the specified software requirements are assigned from a dependency between blocks; A refactoring execution unit for changing the subsystem of the model from the subset;
A simulation execution and result comparison unit for executing simulation of the model before and after the refactoring and comparing execution results;
A result display unit for displaying the block to which the software requirement is assigned, the subsystem changed by the refactoring, and a difference between simulation results;
A software design support apparatus comprising:
前記トレース分析部は、あらかじめ前記ソフトウェア要件と、前記モデルの前記ブロックおよび前記サブシステムとの前記紐付け情報を記録しており、前記紐付け情報に変更があった場合のみトレース分析を実行すること、を特徴とする請求項1に記載のソフトウェア設計支援装置。 The trace analysis unit records the software requirements and the association information between the block of the model and the subsystem in advance, and performs trace analysis only when the association information is changed. The software design support apparatus according to claim 1. モデルベース開発における、既存モデルをソフトウェア要件に従ってリファクタリングを行うソフトウェア設計支援方法であって、
前記モデルのサブシステムと前記ソフトウェア要件の紐付け情報から、どの前記サブシステムがどの前記ソフトウェア要件にかかわっているかをトレース分析する過程と、
入力として指定された複数の前記ソフトウェア要件を元にリファクタリング対象の前記モデルの前記サブシステムを展開し、ブロック間の依存関係から指定された前記ソフトウェア要件が割り当てられた前記ブロックのサブセットを分析し、前記サブセットから前記モデルの前記サブシステムを変更することにより前記リファクタリングを実行する過程と、
前記リファクタリングの前後における前記モデルのシミュレーションを実行し、実行結果を比較する過程と、
前記ソフトウェア要件が割り当てられた前記ブロックと、前記リファクタリングによって変更した前記サブシステムと、シミュレーション結果の差分と、を表示する過程と、
を含むことを特徴とするソフトウェア設計支援方法。
A software design support method for refactoring an existing model according to software requirements in model-based development,
Trace analysis of which subsystem is related to which software requirement from the association information of the model subsystem and the software requirement;
Expanding the subsystem of the model to be refactored based on a plurality of the software requirements specified as input, and analyzing a subset of the blocks to which the specified software requirements are assigned from a dependency between blocks; Performing the refactoring by changing the subsystem of the model from the subset;
Performing a simulation of the model before and after the refactoring and comparing the execution results;
Displaying the block to which the software requirement is assigned, the subsystem changed by the refactoring, and a difference in simulation results;
A software design support method comprising:
前記トレース分析する過程は、あらかじめ前記ソフトウェア要件と、前記モデルの前記ブロックおよび前記サブシステムとの前記紐付け情報を記録しており、前記紐付け情報に変更があった場合のみ前記トレース分析を実行する過程を含むことを特徴とする請求項3に記載のソフトウェア設計支援方法。 In the process of performing the trace analysis, the software requirements and the association information between the block of the model and the subsystem are recorded in advance, and the trace analysis is executed only when the association information is changed. 4. The software design support method according to claim 3, further comprising:
JP2014166325A 2014-08-19 2014-08-19 Software design support device, and method Pending JP2016042317A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014166325A JP2016042317A (en) 2014-08-19 2014-08-19 Software design support device, and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014166325A JP2016042317A (en) 2014-08-19 2014-08-19 Software design support device, and method

Publications (1)

Publication Number Publication Date
JP2016042317A true JP2016042317A (en) 2016-03-31

Family

ID=55592030

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014166325A Pending JP2016042317A (en) 2014-08-19 2014-08-19 Software design support device, and method

Country Status (1)

Country Link
JP (1) JP2016042317A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018154784A1 (en) * 2017-02-27 2018-08-30 三菱電機株式会社 Effect extraction device, effect extraction program, and effect extraction method
JP2021077084A (en) * 2019-11-08 2021-05-20 株式会社デンソー Model analysis device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018154784A1 (en) * 2017-02-27 2018-08-30 三菱電機株式会社 Effect extraction device, effect extraction program, and effect extraction method
JPWO2018154784A1 (en) * 2017-02-27 2019-06-27 三菱電機株式会社 Influence extraction device, influence extraction program and influence extraction method
JP2021077084A (en) * 2019-11-08 2021-05-20 株式会社デンソー Model analysis device

Similar Documents

Publication Publication Date Title
CN110928772B (en) Test method and device
CN111241454B (en) Method, system and device for generating webpage codes
NL2010546C2 (en) Method and apparatus for automatically generating a test script for a graphical user interface.
US9021440B1 (en) System and method for automated test script generation
JP5350428B2 (en) Automatic program generation apparatus, method and computer program
US9904524B2 (en) Method and device for visually implementing software code
JP2007052703A (en) Test scenario creation program, test scenario creation apparatus, and test scenario creation method
US20070061641A1 (en) Apparatus and method for generating test driver
US20140214396A1 (en) Specification properties creation for a visual model of a system
CN106354492A (en) Automatic code generation method and system capable of rapidly adjusting transaction process connection
US20080208554A1 (en) Simulator development system and simulator development method
JP2016042317A (en) Software design support device, and method
JP5405684B1 (en) Source program programming language converter
CN111143228B (en) Test code generation method and device based on decision table method
JP2013020437A (en) Requirements management support device
CN107590044B (en) Testing method, device and equipment for distributed storage cluster
JP7318704B2 (en) Test equipment, test method and program
JP6702072B2 (en) Control program, device, and method
Szvetits et al. Enhancing root cause analysis with runtime models and interactive visualizations
JP3930255B2 (en) System specification information processing apparatus, system specification information processing method, and program
CN107563025B (en) Verification platform management method and device
JP5578625B2 (en) Program analysis apparatus, program analysis method, and program
JP6437396B2 (en) Trace information management system, method, and program
KR100791303B1 (en) Apparatus and method for making component of build block
CN111522737B (en) Automatic test verification method and device for front-end interface and storage medium

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20160520