JP2007047971A - Individual program generation device and method - Google Patents

Individual program generation device and method Download PDF

Info

Publication number
JP2007047971A
JP2007047971A JP2005230629A JP2005230629A JP2007047971A JP 2007047971 A JP2007047971 A JP 2007047971A JP 2005230629 A JP2005230629 A JP 2005230629A JP 2005230629 A JP2005230629 A JP 2005230629A JP 2007047971 A JP2007047971 A JP 2007047971A
Authority
JP
Japan
Prior art keywords
program
individual
base
new
change
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.)
Withdrawn
Application number
JP2005230629A
Other languages
Japanese (ja)
Inventor
Eiji Obara
栄治 小原
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.)
Denso Ten Ltd
Original Assignee
Denso Ten 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 Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP2005230629A priority Critical patent/JP2007047971A/en
Publication of JP2007047971A publication Critical patent/JP2007047971A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an individual program generation device capable of preventing correction error in automatic generation an individual control program with a product individual characteristic assigned thereto using a basic control program in software development. <P>SOLUTION: The individual program generation device 20 for generating an individual program from a base program comprises a means 24 extracting a first change difference between the base program and an individual program, a means 25 extracting a second change difference between the base program and a new base program, a means 26 forming a pseudo new base program by adding the second change different to the base program, and a means 23 generating a new individual program by adding the first change different to the pseudo new base program. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明はソフトウェア開発に関し、特に基本制御プログラムを利用して、それに製品個別の特性を付与した個別制御プログラムを生成する個別プログラム生成装置及び方法に関するものである。   The present invention relates to software development, and more particularly to an individual program generation apparatus and method for generating an individual control program using a basic control program and imparting individual product characteristics to the basic control program.

従来から、組込みソフトウェア産業等においては、ソフトウェア開発のベースとなる基本制御プログラム(以降、「ベースプログラム」又は「標準部品」とよぶ)を利用して、それに製品個別の制御処理を付与した個別制御プログラム(以降、「個別プログラム」又は「個別部品」とよぶ)を作成している。   Conventionally, in the embedded software industry, etc., individual control that uses a basic control program (hereinafter referred to as “base program” or “standard part”), which is the basis of software development, and gives individual control processing to it. A program (hereinafter referred to as “individual program” or “individual part”) is created.

ベースプログラム作成者は、制御の基本となる処理プログラムを作成・管理し、それを製品開発者へ提供する。製品開発者は、ベースプログラム作成者から提供されるベースプログラム群から製品に必要なベースプログラムを適宜選択し、その選択したベースプログラムに該当製品の個別の特徴を付与することで個別プログラムを作成する。そして、それを実際の製品で使用する個別部品として使用する。   The base program creator creates and manages a processing program that is the basis of control, and provides it to the product developer. The product developer appropriately selects a base program necessary for the product from a group of base programs provided by the base program creator, and creates an individual program by adding individual characteristics of the corresponding product to the selected base program. . Then, it is used as an individual part used in an actual product.

ところで、基本となるベースプログラムに何らかの変更が加えられると、変更前のベースプログラムを利用した個別プログラムを改変する必要が生じる。従来から、変更元のプログラムとそれを利用する変更先のプログラムとの2者間の比較によってプログラム変更箇所を自動的に検出するツールが存在しており、製品開発者がその変更箇所を参照しながら手作業で既存の個別プログラムに修正を加えていた(特許文献1参照)。   By the way, when any change is made to the basic base program, it becomes necessary to modify the individual program using the base program before the change. Conventionally, there is a tool that automatically detects the program change location by comparing the source program and the destination program that uses it, and the product developer refers to the change location. However, the existing individual program was modified manually (see Patent Document 1).

図1には、従来におけるプログラム変更箇所の自動検出ツールの一例を示している。
自動検出ツールは、変更前のベースプログラムb0とそれを利用して作成した個別プログラムm0とを比較して、その間の差分情報からなる差分情報リスト11を作成する。また、変更前のベースプログラムb0と変更後の新ベースプログラムb1とを比較して、その間の差分情報からなる差分情報リスト12を作成する。
FIG. 1 shows an example of a conventional automatic detection tool for program change locations.
The automatic detection tool compares the base program b0 before the change with the individual program m0 created using the base program b0, and creates a difference information list 11 including difference information therebetween. Further, the base program b0 before the change and the new base program b1 after the change are compared, and a difference information list 12 including difference information therebetween is created.

製品開発者(個別プログラムのプログラマー)は、前記差分情報リスト11及び差分情報リスト12のプログラム変更箇所を参照しながら、新ベースプログラムb1を参照して新個別プログラムm1を自ら作成していた。また、該自動検出ツールにはプログラム自動生成機能を有しているものがあり、現状の個別プログラムm0と変更後の新ベースプログラムb1とを比較してその間の差分を求め、その差分内容を変更後の新ベースプログラムb1に加えることで新個別プログラムm1を自動生成することも行われていた(後述の図2参照)。   The product developer (individual program programmer) created the new individual program m1 by referring to the new base program b1 while referring to the program change portions of the difference information list 11 and the difference information list 12. Some of the automatic detection tools have an automatic program generation function. The current individual program m0 is compared with the new base program b1 after the change to obtain a difference between them, and the content of the difference is changed. A new individual program m1 is automatically generated by adding to the later new base program b1 (see FIG. 2 described later).

特開平4−178833号公報JP-A-4-178833

しかしながら、従来においてはベースプログラムb0と新ベースプログラムb1との比較によって得られた差分情報リスト12と、ベースプログラムb0と個別プログラムm0との比較によって得られた差分情報リスト11との間の変更内容を、製品開発者が個別に把握・理解して新ベースプログラムb1に手作業で変更を加える必要が生じるため、人為的な修正漏れや、修正規模に応じた確認工数が必要になる等の問題があった。   However, in the past, changes between the difference information list 12 obtained by comparing the base program b0 and the new base program b1 and the difference information list 11 obtained by comparing the base program b0 and the individual program m0. Since the product developer must individually understand and understand the new base program b1 to make manual changes, problems such as omissions due to artificial corrections and confirmation man-hours corresponding to the scale of correction are required. was there.

一方、自動検出ツールのプログラム自動生成機能を用いる場合は、以下に示すような問題があった。図2は、従来のプログラム自動生成機能13を使って新ベースプログラムb1から新個別プログラムm1を自動生成する一例を示している。   On the other hand, when the automatic program generation function of the automatic detection tool is used, there are the following problems. FIG. 2 shows an example in which a new individual program m1 is automatically generated from a new base program b1 using the conventional program automatic generation function 13.

本例において、個別プログラムm0は、ベースプログラムb0に個別制御用の追加設定値「b004」(点線枠で示す)を付加したものである。また、新ベースプログラムb1は、ベースプログラムb0に主制御用の追加設定値「b004」(実線枠で示す)を付加したものである。   In this example, the individual program m0 is obtained by adding an additional setting value “b004” (indicated by a dotted frame) for individual control to the base program b0. The new base program b1 is obtained by adding an additional set value “b004” (indicated by a solid line frame) for main control to the base program b0.

プログラム自動生成機能13は、最終生成物である個別プログラムm0と新ベースプログラムb1とを比較して互いのプログラム構成の差分を求め、その差分を新ベースプログラムb1に付加することで新個別プログラムm1を生成していた。ここでは、そのような差分が検出されないことから、新ベースプログラムb1をそのまま用いた新個別プログラムm1を生成する。   The automatic program generation function 13 compares the individual program m0, which is the final product, with the new base program b1, obtains a difference in the program configuration of each other, and adds the difference to the new base program b1, thereby creating the new individual program m1 Was generated. Here, since such a difference is not detected, a new individual program m1 using the new base program b1 as it is is generated.

プログラム自動生成機能13は、プログラムを構成する個々のプログラム機能の生成過程や具体的な処理内容を判別しないことから、プログラム機能の単純な有無を比較することによって新個別プログラムm1を生成していた。その結果、本例の新個別プログラムm1は「主制御用の追加設定値b004(実線枠で囲む)」だけを含み、「個別制御用の追加設定値b004(点線枠で囲む)」はプログラムの生成過程で消失していいた。   Since the automatic program generation function 13 does not determine the generation process or specific processing contents of the individual program functions constituting the program, the new individual program m1 is generated by comparing the simple existence of the program functions. . As a result, the new individual program m1 of this example includes only “additional setting value b004 for main control (enclosed by a solid frame)”, and “additional setting value b004 for individual control (enclosed by a dotted frame)” It disappeared in the generation process.

上記の例のように、ベースプログラム改修後と個別プログラム作成後の各プログラム構成要素の単純な比較が意味をなさず、作成される新個別プログラムm1に個別プログラムm0の変更内容が反映されないような場合、機械作業による誤修正やその修正規模に応じた確認工数が発生するという問題があった。   As in the above example, the simple comparison of each program component after the base program modification and the individual program creation does not make sense, and the new individual program m1 to be created does not reflect the changed contents of the individual program m0. In such a case, there is a problem in that erroneous correction due to mechanical work and confirmation man-hours corresponding to the scale of the correction occur.

そこで本発明の目的は、上記の問題点に鑑み、ベースプログラムに固有の特徴を付与して製品用の個別プログラムを生成する装置において、ベースプログラムの変更に伴う個別プログラムの誤修正を防止して、安全に変更後のベースプログラムに対応した新個別プログラムを生成できる個別プログラム生成装置及びその方法を提供することにある。   Therefore, in view of the above problems, an object of the present invention is to prevent erroneous correction of an individual program accompanying a change in the base program in an apparatus for generating an individual program for a product by adding unique features to the base program. Another object of the present invention is to provide an individual program generation apparatus and method capable of safely generating a new individual program corresponding to the base program after the change.

本発明によれば、ベースプログラムから個別プログラムを生成する個別プログラム生成装置であって、ベースプログラムと個別プログラムとの間の第1の変更差分を抽出する手段と、前記ベースプログラムと新ベースプログラムとの間の第2の変更差分を抽出する手段と、前記ベースプログラムに前記第2の変更差分を加えて擬似新ベースプログラムを作成する手段と、前記擬似新ベースプログラムに前記第1の変更差分を加えて新個別プログラムを生成する手段と、を有する個別プログラム生成装置が提供される。   According to the present invention, there is provided an individual program generating device for generating an individual program from a base program, the means for extracting a first change difference between the base program and the individual program, the base program and the new base program Means for extracting a second change difference between the base program, means for adding the second change difference to the base program to create a pseudo-new base program, and adding the first change difference to the pseudo-new base program. In addition, there is provided an individual program generation device having means for generating a new individual program.

前記個別プログラム生成装置は、さらに前記変更差分を管理する管理手段を有し、前記管理手段は前記擬似新ベースプログラムを前記ベースプログラムと前記第2の変更差分によって管理する。前記管理手段は、さらに前記新個別プログラムを前記ベースプログラムと前記第1及び2の変更差分によって管理する。   The individual program generation device further includes management means for managing the change difference, and the management means manages the pseudo-new base program based on the base program and the second change difference. The management means further manages the new individual program by the base program and the first and second change differences.

前記個別プログラム生成装置は、さらに出力表示手段を有し、前記出力表示手段は前記変更差分をその内容に基づいて表示色を変えて表示する。また、前記出力表示手段は前記第1及び第2の変更差分の相互の対応関係を視認可能な手段で表示する。   The individual program generation device further includes output display means, and the output display means displays the change difference by changing the display color based on the contents. Further, the output display means displays the correspondence between the first and second change differences by means that can be visually recognized.

また、本発明によれば、ベースプログラムから個別プログラムを生成する個別プログラム生成方法であって、ベースプログラムと個別プログラムとの間の第1の変更差分を抽出するステップと、前記ベースプログラムと新ベースプログラムとの間の第2の変更差分を抽出するステップと、前記ベースプログラムに前記第2の変更差分を加えて擬似新ベースプログラムを作成するステップと、前記擬似新ベースプログラムに前記第1の変更差分を加えて新個別プログラムを生成するステップと、を有する個別プログラム生成方法が提供される。   According to the present invention, there is also provided an individual program generation method for generating an individual program from a base program, the step of extracting a first change difference between the base program and the individual program, the base program and the new base Extracting a second change difference from the program; adding a second change difference to the base program to create a pseudo-new base program; and changing the first change to the pseudo-new base program And a step of generating a new individual program by adding a difference.

本発明によれば、ベースプログラムに対する新ベースプログラム及び製品個別プログラムの各差分情報を抽出し、前記ベースプログラムを基準にその差分情報を使って新個別プログラムを自動生成するため、変更情報が確実に承継され、修正誤りのない安全性で効率的な個別プログラムの生成が可能となる。また、プログラム変更箇所を着色等によって強調表示することで変更箇所の特定も容易となる。   According to the present invention, since each difference information of the new base program and the product individual program with respect to the base program is extracted, and the new individual program is automatically generated using the difference information based on the base program, the change information is ensured. Successive, safe and efficient individual programs can be generated without correction errors. Further, by highlighting the program change location by coloring or the like, the change location can be easily identified.

図3は、本発明による個別プログラム生成装置の基本構成を示したものである。
図3において、ベースプログラムb0は製品のバリエーションに共通する処理を集約したプログラムである。個別プログラムm0は製品に固有の処理を前記ベースプログラムb0に付与したプログラムである。新ベースプログラムb1は、ベースプログラムb0に各種変更を加えた更新後のベースプログラムである。
FIG. 3 shows a basic configuration of an individual program generation apparatus according to the present invention.
In FIG. 3, a base program b0 is a program in which processes common to product variations are aggregated. The individual program m0 is a program in which processing unique to a product is given to the base program b0. The new base program b1 is an updated base program in which various changes are made to the base program b0.

擬似新ベースプログラムb2は、ベースプログラムb0を基準とし、それに新ベースプログラムb1との変更情報(差分情報)を加えて得られた新ベースプログラムb1と等価なベースプログラム(新ベースプログラムb1を擬似するプログラム自動生成処理用の新ベースプログラムb2)である。擬似新ベースプログラムb2は、新個別プログラムm1を自動生成する際に新ベースプログラムb1に代えて使用される。新個別プログラムm1は、新ベースプログラムb1に製品固有の処理を付与したプログラムである。   The pseudo new base program b2 is based on the base program b0 and is equivalent to the new base program b1 obtained by adding change information (difference information) to the new base program b1 to simulate the new base program b1. This is a new base program b2) for automatic program generation processing. The pseudo new base program b2 is used in place of the new base program b1 when the new individual program m1 is automatically generated. The new individual program m1 is a program in which product-specific processing is added to the new base program b1.

個別プログラム生成装置20において、差分情報抽出部24は、ベースプログラムb0を基準とした個別プログラムm0との差分情報d1(=m0−b0)、すなわち差分内容、差分位置、及び差分区分(追加・変更・削除)等、を抽出して管理する。また、前記差分情報抽出部24は、差分情報d1やその差分ステップ前後の個別プログラムの構文情報によって変更箇所を制御単位で管理する。   In the individual program generation device 20, the difference information extraction unit 24 includes difference information d1 (= m0−b0) from the individual program m0 based on the base program b0, that is, the difference contents, the difference position, and the difference classification (addition / change).・ Delete etc.) and manage them. Further, the difference information extraction unit 24 manages the changed portion in units of control based on the difference information d1 and the syntax information of the individual program before and after the difference step.

もう一つの差分情報抽出部25は、ベースプログラムb0と新ベースプログラムb1との間の差分情報d2(=b1−b0)、すなわち差分内容、差分位置、及び差分区分(追加・変更・削除)等、を抽出して管理する。前記差分情報抽出部25は、また差分情報d2やその差分ステップ前後の個別プログラムの構文情報によって変更箇所を制御単位で管理する。   Another difference information extraction unit 25 is the difference information d2 (= b1-b0) between the base program b0 and the new base program b1, that is, the difference content, the difference position, the difference classification (addition / change / deletion), etc. , Extract and manage. The difference information extraction unit 25 also manages the change location in units of control based on the difference information d2 and the syntax information of the individual programs before and after the difference step.

個別プログラム差分情報DB21は、オペレータ等が外部から入力するベースプログラムb0と個別プログラムm0の差分情報βを、外部データベースで管理する。ベースプログラム差分情報DB22は、オペレータ等が外部入力するベースプログラムb0と新ベースプログラムb1の差分情報αを外部データベースで管理する。   The individual program difference information DB 21 manages the difference information β between the base program b0 and the individual program m0 input from the outside by an operator or the like in an external database. The base program difference information DB 22 manages the difference information α between the base program b0 and the new base program b1 externally input by an operator or the like in an external database.

ベース更新情報管理部26は、差分情報抽出部25で抽出した差分情報d2を保持し、それとベースプログラムb0を加えることで擬似新ベースプログラムb2(=b0+d2)を作成する。ベース更新情報管理部26は、必要ならベースプログラム差分情報DB22から与えられる差分情報αの差分内容、差分位置、及び差分区分を、前記擬似新ベースプログラムb2に含めることができる。この場合、差分情報αを含む擬似新ベースプログラムb2(=b0+d2+α)が作成される。   The base update information management unit 26 holds the difference information d2 extracted by the difference information extraction unit 25, and creates a pseudo new base program b2 (= b0 + d2) by adding it and the base program b0. The base update information management unit 26 can include, in the pseudo new base program b2, the difference contents, difference positions, and difference sections of the difference information α given from the base program difference information DB 22, if necessary. In this case, a pseudo new base program b2 (= b0 + d2 + α) including the difference information α is created.

プログラム生成部23は、擬似新ベースプログラムb2(=b0+d2)の情報に差分情報抽出部24からの差分情報d1を加えることで新個別プログラムm1(=(b0+d2)+d1)を生成する。本発明はベースプログラムb0を基準とし、それに差分情報d1及びd2を加える構成をとるため、新ベースプログラムb1(=b0+d2)との整合性を維持したまま新個別プログラムm1(=b0+d2+d1)を自動生成することができる。その結果、図2の従来例で示したように、生成後のプログラム要素の単純な比較によって生じ得る誤修正が防止される。   The program generation unit 23 generates a new individual program m1 (= (b0 + d2) + d1) by adding the difference information d1 from the difference information extraction unit 24 to the information of the pseudo new base program b2 (= b0 + d2). Since the present invention is based on the base program b0 and adds the difference information d1 and d2 to it, a new individual program m1 (= b0 + d2 + d1) is automatically generated while maintaining consistency with the new base program b1 (= b0 + d2). can do. As a result, as shown in the conventional example of FIG. 2, erroneous correction that may occur due to simple comparison of the generated program elements is prevented.

プログラム生成部23は、必要ならベースプログラム差分情報DB21から与えられる差分情報βを自動生成する新個別プログラムm1に含めることができる。この場合、差分情報βをさらに含む新個別プログラムm1(=b0+d2+d1+β)が生成される。   The program generator 23 can be included in the new individual program m1 that automatically generates the difference information β given from the base program difference information DB 21 if necessary. In this case, a new individual program m1 (= b0 + d2 + d1 + β) further including the difference information β is generated.

図4は、図3の個別プログラム生成装置の基本的な処理手順の例を示したものである。
ここでは、先ず、差分情報抽出部24が、個別プログラムm0とベースプログラムb0の差分d1(=m0−b0)を抽出する(S101)。同様に、差分情報抽出部25が、新ベースプログラムb1とベースプログラムb0の差分情報d2(=b1−b0)を抽出する(S102)。次に、ベース更新情報管理部26が、ベースプログラムb0に差分情報d2を加えて新ベースプログラムb1と等価な擬似新ベースプログラムb2(=b0+d2)を作成する(S103)。最後に、プログラム生成部23が、擬似新ベースプログラムb2に差分情報d1の変更情報を加えて新個別プログラムm1(=b0+d1+d2)を作成する(S104)。
FIG. 4 shows an example of a basic processing procedure of the individual program generation apparatus of FIG.
Here, first, the difference information extraction unit 24 extracts the difference d1 (= m0−b0) between the individual program m0 and the base program b0 (S101). Similarly, the difference information extraction unit 25 extracts difference information d2 (= b1-b0) between the new base program b1 and the base program b0 (S102). Next, the base update information management unit 26 adds the difference information d2 to the base program b0 to create a pseudo new base program b2 (= b0 + d2) equivalent to the new base program b1 (S103). Finally, the program generation unit 23 adds the change information of the difference information d1 to the pseudo new base program b2 to create a new individual program m1 (= b0 + d1 + d2) (S104).

図5は、図3及び4の入出力データの一例を示したものである。
図5において、IN1は処理の基本となるベースプログラムb0である。IN2は、ベースプログラムに製品固有の追加、編集を実施した個別プログラムm0である。本例では、ベースプログラムb0のb102がC102に「個別変更」の差分区分を付して変更されており、また「個別追加」の差分区分を付したA104が新たに追加されている。このため、本例における差分情報d1は(個別変更C102−b102)と個別追加A104とからなる。
FIG. 5 shows an example of the input / output data of FIGS.
In FIG. 5, IN1 is a base program b0 that is the basis of processing. IN2 is an individual program m0 obtained by adding and editing a product unique to the base program. In this example, b102 of the base program b0 is changed by adding a difference category of “individual change” to C102, and A104 with a difference category of “individual addition” is newly added. Therefore, the difference information d1 in this example is composed of (individual change C102-b102) and individual addition A104.

一方、IN3は、処理の基本となるベースプログラムb0に変更を実施した新ベースプログラムb1である。本例では、ベースプログラムb0のb103が「ベース変更」の差分区分を付したC203に変更されている。このため、本例における差分情報d2は(ベース変更C203−b103)である。従って、b2=b0+d2=(b101+b102+b103)+(ベース変更C203−b103)=b101+b102+ベース変更C203となる。   On the other hand, IN3 is a new base program b1 in which the base program b0 that is the basis of the processing is changed. In this example, b103 of the base program b0 is changed to C203 with a difference classification of “base change”. Therefore, the difference information d2 in this example is (base change C203-b103). Therefore, b2 = b0 + d2 = (b101 + b102 + b103) + (base change C203−b103) = b101 + b102 + base change C203.

同様に、新個別プログラムm1=b2+d1=(b101+b102+ベース変更C203)+((個別変更C102−b102)+個別追加A104)=b101+個別変更C102+ベース変更C203+個別追加A104となる。しかしながら、b0→b1への更新の際にベースプログラムb0のb102が修正等される場合があり、この場合には修正前のb102の存在を前提とする個別変更C102の使用が修正誤りを生じさせることになる。   Similarly, new individual program m1 = b2 + d1 = (b101 + b102 + base change C203) + ((individual change C102−b102) + individual addition A104) = b101 + individual change C102 + base change C203 + individual addition A104. However, there is a case where b102 of the base program b0 is modified at the time of updating from b0 to b1, and in this case, the use of the individual change C102 that presupposes the existence of b102 before the correction causes a correction error. It will be.

そのため、本発明の新個別プログラムm1には、個別変更C102に加えてその変更元であるベースプログラムb0のb102を対で含めるようにしている。これにより、新個別プログラムm1においてb102→個別変更C102への修正が正しく実行される。上述した本発明の構成により、図2の従来例とは異なり、ベースプログラムb0用のb102が新個別プログラムm1用の個別変更C102へ正しく修正される。   Therefore, in the new individual program m1 of the present invention, in addition to the individual change C102, b102 of the base program b0 that is the change source is included in a pair. As a result, the correction from b102 to individual change C102 is correctly executed in the new individual program m1. With the configuration of the present invention described above, unlike the conventional example of FIG. 2, b102 for the base program b0 is correctly corrected to the individual change C102 for the new individual program m1.

図6は、差分情報d1及びd2の位置情報を検出して保持する処理例を示したものである。図7には、制御構造の判定対象となるプログラムの一例を示している。
図6の処理の前提として、先ず差分抽出対象となる変更元プログラムと変更先プログラムとを指定し、変更元プログラムと変更先プログラムの差分情報を抽出する。次に、変更先プログラムが条件式及び定義式等のプログラム構文解析を実施し(S101)、制御構造を形成するキーワードを検出した場合にはその制御構造の開始位置や終了位置を判定する(S102)。図7には、if文の条件式で始まる制御構造や真偽等の定義式からなる非制御構造を含むプログラムの一例を示している。
FIG. 6 shows an example of processing for detecting and holding the position information of the difference information d1 and d2. FIG. 7 shows an example of a program to be a control structure determination target.
As a premise of the processing in FIG. 6, first, a change source program and a change destination program to be extracted are designated, and difference information between the change source program and the change destination program is extracted. Next, the program to be changed performs program syntax analysis of conditional expressions and definition expressions (S101), and when a keyword forming the control structure is detected, the start position and end position of the control structure are determined (S102). ). FIG. 7 shows an example of a program including a control structure starting with a conditional expression of an “if” statement and a non-control structure consisting of a definition expression such as true / false.

抽出した差分情報のうち位置情報が構文解析(S101)で検出したプログラムブロック内にある場合には、そのブロック構造の開始位置から終了位置までのプログラムステップを変更情報として記憶する(S103及び105)。一方、抽出した差分情報のうち位置情報が構文解析で検出したプログラムブロック外のときは、当該位置前後の所定のプログラムステップ数を変更情報として記憶する(S103及び104)。変更先プログラムの構文解析が終了したときに本処理は終了する(S106)。   If the position information in the extracted difference information is in the program block detected by the syntax analysis (S101), the program step from the start position to the end position of the block structure is stored as change information (S103 and 105). . On the other hand, when the position information of the extracted difference information is outside the program block detected by the syntax analysis, a predetermined number of program steps before and after the position is stored as change information (S103 and 104). When the parsing of the change destination program is completed, this process ends (S106).

図8は、変更・追加されたプログラム要素の挿入位置決定処理の一例を示したものである。
図8において、初期化処理を実行した後、新ベースプログラムb1との差分情報d2の読込を行い(S201)、次にベースプログラムb0の読込を行う(S202)。その間の差分情報d2から図6で抽出した位置変更情報及び周辺ステップ情報を元に、文字列比較、位置情報比較、空行補正比較等の手法を用いてベースプログラムb0への挿入位置を検索する(S203)。その後、対象位置に変更情報を挿入し、ベースプログラムb0に対する差分挿入前後位置における位置情報の補正を行う(S204)。これらの処理をベースプログラムb0の全てのプログラム要素に対して実行した後、そこで得られた変更情報を含む擬似新ベースプログラムb1を作成する(S202及び205)。
FIG. 8 shows an example of an insertion position determination process for a changed / added program element.
In FIG. 8, after executing the initialization process, the difference information d2 from the new base program b1 is read (S201), and then the base program b0 is read (S202). Based on the position change information and the peripheral step information extracted in FIG. 6 from the difference information d2 between them, the insertion position in the base program b0 is searched using techniques such as character string comparison, position information comparison, blank line correction comparison, etc. (S203). Thereafter, the change information is inserted into the target position, and the position information at the position before and after the difference insertion with respect to the base program b0 is corrected (S204). After these processes are executed for all program elements of the base program b0, a pseudo new base program b1 including change information obtained there is created (S202 and 205).

次に、作成された擬似新ベースプログラムを用いて新個別プログラムの生成処理を実行する。先ず個別プログラムm0の差分情報読込d1を行い(S206)、そして作成された擬似新ベースプログラムb1の読込を行う(S207)。ここでも、差分情報d1から図6で抽出した位置変更情報及び周辺ステップ情報を元に、文字列比較、位置情報比較、空行補正比較等の手法を用いて擬似新ベースプログラムb1への挿入位置を検索し、対象位置に変更情報を挿入する(S209)。   Next, a new individual program generation process is executed using the created pseudo-new base program. First, the difference information reading d1 of the individual program m0 is performed (S206), and the created pseudo new base program b1 is read (S207). Also here, based on the position change information and peripheral step information extracted in FIG. 6 from the difference information d1, the insertion position in the pseudo-new base program b1 using techniques such as character string comparison, position information comparison, blank line correction comparison, etc. And change information is inserted into the target position (S209).

その後、擬似新ベースプログラムb1に対する差分挿入前後位置における位置情報の補正を行う(S210)。これらの処理を擬似新ベースプログラムb1の全てのプログラム要素に対して実行した後、そこで得られた変更情報を有する新個別プログラムm1を作成する(S207及び208)。   Thereafter, the position information at the position before and after the difference insertion with respect to the pseudo new base program b1 is corrected (S210). After these processes are executed for all program elements of the pseudo new base program b1, a new individual program m1 having change information obtained there is created (S207 and 208).

図9には、図6及び8の処理を実行して得られたプログラム構造の一例を示している。
ここでは、ベースプログラムb0、それをベースに作成される新ベースプログラムb1、そして新ベースプログラムb1をベースに作成される新個別プログラムm1、の三者の関係が分かるように変更位置情報が付されている。本例のプログラム構造は、b101等のラベルが付与されたプログラム内容と、b0、b2、m1にそれぞれ対応するプログラムのステップ位置情報を含む。
FIG. 9 shows an example of a program structure obtained by executing the processes of FIGS.
Here, the change position information is attached so that the relationship between the three of the base program b0, the new base program b1 created based on the base program b0, and the new individual program m1 created based on the new base program b1 can be understood. ing. The program structure of this example includes program contents to which a label such as b101 is assigned and step position information of programs corresponding to b0, b2, and m1, respectively.

図中の具体例で説明すると、IN1のベースプログラムb0は、処理の基本となるベースプログラム内容(b101〜b105)とそれぞれのプログラムステップ位置(1〜5)で管理される。IN2の個別プログラムm0は、ベースプログラムb0に製品固有の追加、編集を実施(個別変更C102、個別追加A104)した個別プログラムの内容と対応するプログラムステップ位置(1〜5)で管理される。   To explain with a specific example in the figure, the base program b0 of IN1 is managed by the base program contents (b101 to b105) as the basis of processing and the respective program step positions (1 to 5). The individual program m0 of IN2 is managed at program step positions (1 to 5) corresponding to the contents of the individual program that has been added and edited (individual change C102, individual addition A104) unique to the base program b0.

IN3の新ベースプログラムb1は、処理の基本となるベースプログラムに変更を実施(ベース変更C103)した新ベースプログラムの内容と対応するプログラムステップ位置(1〜5)で管理される。また、IN1に差分情報d2(=IN4−IN3)を加えて作成されるIN4の擬似新ベースプログラムb2では、b1で更新されたプログラム内容(ベース変更C203)とそのステップ位置情報(3)をb0のものと区別して並列に配置(b1の欄参照)される。これにより、b0とb1との間のプログラム内容及びステップ位置情報の相違及び相互の関連が管理される。   The new base program b1 of IN3 is managed at program step positions (1 to 5) corresponding to the contents of the new base program that has been changed to the base program that is the basis of processing (base change C103). In addition, in the pseudo-new base program b2 of IN4 created by adding difference information d2 (= IN4-IN3) to IN1, the program content (base change C203) updated in b1 and its step position information (3) are b0. Are arranged in parallel (see the column b1). Thereby, the difference in the program contents and the step position information between b0 and b1 and the mutual relationship are managed.

最後に生成されるOUT1の新個別プログラムm1は、b2に差分情報d1を加えて作成される。本例でもIN4の場合と同様に、b0、b1、m1の間のプログラム内容及びステップ位置情報の相違を明確に区別して管理するため、m1で更新されたプログラム内容(個別変更C102、個別追加A104)とそのステップ位置情報(2及び4)を、b0及びb1のものとは別に配置(m1の欄参照)される。なお、新個別プログラムm1の実際の動作では、ステップ位置2で個別変更C102が実行され、ステップ位置4では個別追加A104が実行される。   The newly generated new individual program m1 of OUT1 is created by adding difference information d1 to b2. Also in this example, as in the case of IN4, in order to clearly distinguish and manage the difference between the program contents and step position information between b0, b1, and m1, the program contents updated by m1 (individual change C102, individual addition A104 ) And step position information (2 and 4) are arranged separately from those of b0 and b1 (see the column m1). In the actual operation of the new individual program m1, the individual change C102 is executed at step position 2, and the individual addition A104 is executed at step position 4.

図10は、ベースプログラムb0の更新毎に、本発明の個別プログラム生成装置(本ツール)を継続的に使用して、対応する新個別プログラムm1を生成するプログラム更新作業の一例を図式的に示したものである。
本例のベースプログラムVER001は全てのプログラムに共通となる基本制御プログラムである。個別プログラムVER001’は前記基本制御プログラムに製品固有の処理を追加した製品プログラムである。
FIG. 10 schematically shows an example of a program update operation for generating the corresponding new individual program m1 by continuously using the individual program generation device (this tool) of the present invention every time the base program b0 is updated. It is a thing.
The base program VER001 of this example is a basic control program that is common to all programs. The individual program VER001 ′ is a product program obtained by adding product-specific processing to the basic control program.

ここで、ベースプログラムVER001が新ベースプログラムVER002に更新されると、本ツールは、これまで述べてきたように新ベースプログラムVER002とベースプログラムVER001との差分情報d2−1を抽出し、また現状の個別プログラムVER001’とベースプログラムVER001との差分情報d1−1を抽出する。本ツールはVER001とd2−1から擬似新ベースプログラムを作成し、それにd1−1を加えることで新個別プログラムVER002’を生成する。   Here, when the base program VER001 is updated to the new base program VER002, the tool extracts the difference information d2-1 between the new base program VER002 and the base program VER001 as described above, and Difference information d1-1 between the individual program VER001 'and the base program VER001 is extracted. This tool creates a pseudo new base program from VER001 and d2-1 and adds d1-1 to it to generate a new individual program VER002 '.

生成された新個別プログラムVER002’は、図9のOUT1に示すようにベースプログラムVER001、新ベースプログラムVER002、新個別プログラムVER002’の相互の構成比較が可能な形式で保存される。   The generated new individual program VER002 'is stored in a format in which the base program VER001, the new base program VER002, and the new individual program VER002' can be compared with each other as indicated by OUT1 in FIG.

次に、更新されたベースプログラムVER002をさらに新ベースプログラムVER003に更新すると、本ツールは、上記と同様に新ベースプログラムVER003とベースプログラムVER002との差分情報d2−2を抽出し、また現状の個別プログラムVER002’とベースプログラムVER002との差分情報d1−2を抽出する。本ツールはVER002とd2−2から擬似新ベースプログラムを作成し、それにd1−2を加えることで新個別プログラムVER003’を生成する。   Next, when the updated base program VER002 is further updated to the new base program VER003, the tool extracts the difference information d2-2 between the new base program VER003 and the base program VER002 in the same manner as described above, and the current individual program Difference information d1-2 between the program VER002 ′ and the base program VER002 is extracted. This tool creates a pseudo new base program from VER002 and d2-2 and adds d1-2 to it to generate a new individual program VER003 '.

但し、ここで生成される新個別プログラムVER003’の保存では、その基本制御プログラムであるVER002が、初期ベースプログラムVER001からVER002に至る更新履歴を含む形式に変換されて保存される。図9のOUT1の例で示せば、ステップ位置情報のb0の欄が初期ベースプログラムからの更新履歴を含む複数の欄に置き換えられる。本例では、初期ベースプログラムから最新の個別プログラムを生成するまでの履歴が保存されるため、更新を繰り返すことによる誤修正の発生が確実に防止される。   However, in the saving of the new individual program VER003 'generated here, the basic control program VER002 is converted into a format including an update history from the initial base program VER001 to VER002 and saved. In the example of OUT1 in FIG. 9, the column b0 in the step position information is replaced with a plurality of columns including the update history from the initial base program. In this example, since the history from the initial base program to the generation of the latest individual program is saved, the occurrence of erroneous correction due to repeated updating is reliably prevented.

図11及び12は、本発明と関連したユーザインタフェースの改善に関するものである。
図11には、新個別プログラム構成の変更箇所に、変更内容を示す変更記号や特定色を付してディスプレイ表示する一例を示している。本例では、変更記号として「個別変更開始記号」、「個別変更終了記号」等の例を、また特定色としては個別プログラムで変更された要素に「青色」、新ベースプログラムで変更された要素に「桃色」等を着色する例をそれぞれ示している。
11 and 12 relate to improvements in the user interface associated with the present invention.
FIG. 11 shows an example in which a change symbol indicating a change content or a specific color is added to the change location of the new individual program configuration and displayed on the display. In this example, the change symbols are “individual change start symbol”, “individual change end symbol”, etc., and the specific color is “blue” to the element changed by the individual program, the element changed by the new base program Each shows an example of coloring “pink” or the like.

このように、差分として判断される箇所を記号表示、ハイライト表示、着色表示等を行うことで、複雑な更新履歴情報をユーザが容易に理解することが可能になる。これにより、変更意図の伝達が可能となりコードの誤修正防止が可能となる。   As described above, by performing symbol display, highlight display, coloring display, and the like on the portion determined as the difference, the user can easily understand complicated update history information. As a result, it is possible to transmit the change intention and to prevent erroneous correction of the code.

図12には、生成された個別プログラムm1の各プログラム要素と、その元となったベースプログラムb0、新ベースプログラムb1及び個別プログラムm0のそれぞれのプログラム要素との関連を矢印で1つのディスプレイ画面上に表示している。このように、差分として判断される箇所を関連箇所とリンクさせることで、複雑な更新履歴情報をユーザが容易に理解することが可能となり、変更意図の伝達が容易となる。   FIG. 12 shows the relationship between each program element of the generated individual program m1 and each of the program elements of the base program b0, the new base program b1 and the individual program m0 that are the origins on one display screen. Is displayed. In this way, by linking a portion determined as a difference with a related portion, the user can easily understand complicated update history information, and the change intention can be easily transmitted.

従来のプログラム変更箇所の自動検出ツールの一例を示した図である。It is the figure which showed an example of the automatic detection tool of the conventional program change location. 従来のプログラム自動生成の一例を示した図である。It is the figure which showed an example of the conventional program automatic generation. 本発明による個別プログラム生成装置の基本構成を示した図である。It is the figure which showed the basic composition of the individual program production | generation apparatus by this invention. 図3の基本的な処理手順を示した図である。FIG. 4 is a diagram showing a basic processing procedure of FIG. 3. 図3及び4の入出力データの一例を示した図である。It is the figure which showed an example of the input-output data of FIG. 位置情報を検出して保持する処理の一例を示した図である。It is a figure showing an example of processing which detects and holds position information. 制御構造の判定対象となるプログラムの一例を示した図である。It is the figure which showed an example of the program used as the determination object of a control structure. プログラム要素の挿入位置決定処理の一例を示した図である。It is the figure which showed an example of the insertion position determination process of a program element. 図6及び8の処理を行ったプログラム構造の一例を示した図である。It is the figure which showed an example of the program structure which performed the process of FIG. プログラム更新作業の一例を図式的に示した図である。It is the figure which showed typically an example of the program update operation | work. プログラム変更箇所のディスプレイ表示の一例(1)を示した図である。It is the figure which showed an example (1) of the display display of a program change location. プログラム変更箇所のディスプレイ表示の一例(2)を示した図である。It is the figure which showed an example (2) of the display display of a program change location.

符号の説明Explanation of symbols

11、12 差分リスト
13 プログラム生成ツール
20 個別プログラム生成装置
21、22 差分情報データベース
23 プログラム生成部
24、25 差分情報抽出部
26 ベース更新情報管理部
11, 12 Difference list 13 Program generation tool 20 Individual program generation device 21, 22 Difference information database 23 Program generation unit 24, 25 Difference information extraction unit 26 Base update information management unit

Claims (6)

ベースプログラムから個別プログラムを生成する個別プログラム生成装置であって、
ベースプログラムと個別プログラムとの間の第1の変更差分を抽出する手段と、
前記ベースプログラムと新ベースプログラムとの間の第2の変更差分を抽出する手段と、
前記ベースプログラムに前記第2の変更差分を加えて擬似新ベースプログラムを作成する手段と、
前記擬似新ベースプログラムに前記第1の変更差分を加えて新個別プログラムを生成する手段と、
を有することを特徴とする個別プログラム生成装置。
An individual program generation device that generates an individual program from a base program,
Means for extracting a first change difference between the base program and the individual program;
Means for extracting a second change difference between the base program and the new base program;
Means for adding the second change difference to the base program to create a pseudo-new base program;
Means for adding the first change difference to the pseudo-new base program to generate a new individual program;
An individual program generation device comprising:
さらに、前記変更差分を管理する管理手段を有し、
前記管理手段は、前記擬似新ベースプログラムを前記ベースプログラムと前記第2の変更差分によって管理することを特徴とする請求項1記載の個別プログラム生成装置。
Furthermore, it has a management means for managing the change difference,
2. The individual program generation apparatus according to claim 1, wherein the management unit manages the pseudo new base program by the base program and the second change difference.
前記管理手段は、さらに前記新個別プログラムを前記ベースプログラムと前記第1及び2の変更差分によって管理することを特徴とする請求項1記載の個別プログラム生成装置。   2. The individual program generation apparatus according to claim 1, wherein the management unit further manages the new individual program based on the base program and the first and second change differences. さらに、出力表示手段を有し、
前記出力表示手段は、前記変更差分をその内容に基づいて表示色を変えて表示することを特徴とする請求項1〜3のいずれか一つに記載の個別プログラム生成装置。
Furthermore, it has an output display means,
The said output display means displays the said change difference, changing a display color based on the content, The individual program production | generation apparatus as described in any one of Claims 1-3 characterized by the above-mentioned.
前記出力表示手段は、さらに前記第1及び第2の変更差分の相互の対応関係を視認可能な手段で表示することを特徴とする請求項1〜3のいずれか一つに記載の個別プログラム生成装置。   The individual program generation according to any one of claims 1 to 3, wherein the output display means further displays the mutual correspondence between the first and second change differences with a visible means. apparatus. ベースプログラムから個別プログラムを生成する個別プログラム生成方法であって、
ベースプログラムと個別プログラムとの間の第1の変更差分を抽出するステップと、
前記ベースプログラムと新ベースプログラムとの間の第2の変更差分を抽出するステップと、
前記ベースプログラムに前記第2の変更差分を加えて擬似新ベースプログラムを作成するステップと、
前記擬似新ベースプログラムに前記第1の変更差分を加えて新個別プログラムを生成するステップと、
を有することを特徴とする個別プログラム生成方法。
An individual program generation method for generating an individual program from a base program,
Extracting a first change difference between the base program and the individual program;
Extracting a second change difference between the base program and the new base program;
Adding the second change difference to the base program to create a pseudo-new base program;
Adding the first change difference to the pseudo-new base program to generate a new individual program;
An individual program generation method characterized by comprising:
JP2005230629A 2005-08-09 2005-08-09 Individual program generation device and method Withdrawn JP2007047971A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005230629A JP2007047971A (en) 2005-08-09 2005-08-09 Individual program generation device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005230629A JP2007047971A (en) 2005-08-09 2005-08-09 Individual program generation device and method

Publications (1)

Publication Number Publication Date
JP2007047971A true JP2007047971A (en) 2007-02-22

Family

ID=37850755

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005230629A Withdrawn JP2007047971A (en) 2005-08-09 2005-08-09 Individual program generation device and method

Country Status (1)

Country Link
JP (1) JP2007047971A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010061543A (en) * 2008-09-05 2010-03-18 Ntt Data Corp Model-oriented development support device, model-oriented development support method, and model-oriented development support program
JP2010079905A (en) * 2008-09-25 2010-04-08 Internatl Business Mach Corp <Ibm> Method of generating tool for merging customizations made to first version of software artifact when migrating to second version of the software artifact, computer usable medium and data processing system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010061543A (en) * 2008-09-05 2010-03-18 Ntt Data Corp Model-oriented development support device, model-oriented development support method, and model-oriented development support program
JP2010079905A (en) * 2008-09-25 2010-04-08 Internatl Business Mach Corp <Ibm> Method of generating tool for merging customizations made to first version of software artifact when migrating to second version of the software artifact, computer usable medium and data processing system

Similar Documents

Publication Publication Date Title
US7721255B2 (en) Sequence program editing apparatus
JP2007034813A (en) Software manual generation system in two or more natural languages
JP5619328B1 (en) Sequence program creation support device
US20180373218A1 (en) Device and method for common type conversion of plc control program
JP5921765B2 (en) Program graph display device, program graph display method, and program graph display program
JP5747698B2 (en) Requirements management support device
US20220197238A1 (en) Development support device, method for controlling development support device, and recording medium
KR101726120B1 (en) Program editing device, program editing method and computer readable recoding medium for recording program editing program
JP2007047971A (en) Individual program generation device and method
CN108255486B (en) View conversion method and device for form design and electronic equipment
WO2022180704A1 (en) Display control device, display control method, and display control program
EP3926465A1 (en) Method and system for creating an app by merging source code
JP2004126866A (en) Description output suppression program analysis system and description output suppression program analysis method
JP6097231B2 (en) Program generating apparatus and method
JP6664562B1 (en) Debug support device, debug support method, and debug support program
JP2009151613A (en) Program source conversion apparatus
JP2007034782A (en) Document editing device
EP4261678A1 (en) Generation of a technical instruction
JP2008186311A (en) File conversion system for source file with comment described by plurality of kinds of natural languages
JPH0954688A (en) Gui design supporting method
JP2007219586A (en) Source code analysis device
JP2005352625A (en) Localized-version generation supporting system
JP2006520495A (en) Method and apparatus for modifying modular structured messages
JP2006039654A (en) Information managing device
JP2008176408A (en) System design information edit support device and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080730

A761 Written withdrawal of application

Effective date: 20090127

Free format text: JAPANESE INTERMEDIATE CODE: A761