JPH0380327A - Detection system for same area of program - Google Patents

Detection system for same area of program

Info

Publication number
JPH0380327A
JPH0380327A JP1217672A JP21767289A JPH0380327A JP H0380327 A JPH0380327 A JP H0380327A JP 1217672 A JP1217672 A JP 1217672A JP 21767289 A JP21767289 A JP 21767289A JP H0380327 A JPH0380327 A JP H0380327A
Authority
JP
Japan
Prior art keywords
program
comparison
same
logic
same area
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
JP1217672A
Other languages
Japanese (ja)
Inventor
Yasuyoshi Katsuragawa
桂川 泰祥
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP1217672A priority Critical patent/JPH0380327A/en
Publication of JPH0380327A publication Critical patent/JPH0380327A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To facilitate the control of a program by detecting the same logic and applying a prescribed process to this detected logic. CONSTITUTION:A comparison specification specifying means is provided to specify the comparison specifications to decide the same logic of a program together with a comparison means which compares each area of the program with each other based on the specified comparison specifications, and a process means which applies the prescribed processes like an identifying process for the same area, a collecting process, etc., based on the result of comparison. That is, the comparison means compares the steps of the program with each other based on the comparison specifications specified by the comparison specification specifying means. Then the same area of the program is discriminated, and the process means performs an identifying process, a collecting process, etc. As a result, the maintenance/correction of a module is facilitated.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、計算システムに)けるプログラム開発時の
製品チエツクに用いられるプログラムの同一箇所検出方
式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method for detecting identical parts of a program used for product checking during program development in a computer system.

〔従来の技術〕[Conventional technology]

第4−は、プログラム製作にかいて、プログラムの製作
単位の構成を示してTh夕、(1)はプログラム製作単
位であるモジ具−ルを示し、(2)、(3)はモジュー
ル内でコーディングされたロジックで、全く同一の動作
を行なう命令の集ま夕である。
The fourth section shows the structure of the program production unit in program production. It is coded logic and is a collection of instructions that perform exactly the same operation.

次にモジュール製作時の従来方式について説明する。モ
ジュール(0が製作される時開−ロジクク(21,(3
)があっても、そのままコンパイルされプログラムの一
構成要素として当モジュールがそのまま使用される。
Next, the conventional method for manufacturing modules will be explained. When module (0 is produced, open - logic (21, (3
), the module will be compiled and used as is as a component of the program.

[発明が解決しようとする課題] 従来のモジエール製作では、rHJじ処理がいくつかの
所で行なわれる為1次の問題があった。
[Problems to be Solved by the Invention] In conventional modière production, the rHJ process is performed at several locations, which poses a first-order problem.

■ ステップ数が増え、プログラムの保守に時間がかか
る。
■ The number of steps increases and program maintenance takes time.

■ トラブル発生時に、同じ処理すべての修正を行なう
必要があるが、この修正をすべて行なわないという抜け
が発生する。
■ When a problem occurs, it is necessary to correct all of the same processing, but there is an oversight in not making all the corrections.

■ 製作時の試験に余分な時間がかかる。■ Testing during production takes extra time.

■ ステップ数が増え、生産性が落ちる。■ The number of steps increases and productivity decreases.

この発明は上記のような問題点を解消するためになされ
たもので、よう品質の高い製品をよシ早く生産すること
ができるようなプログラムの同一箇所検出方式を得るこ
とを目的とする。
This invention was made to solve the above-mentioned problems, and aims to provide a method for detecting the same part of a program so that high-quality products can be produced more quickly.

〔課題を解決するための手段〕[Means to solve the problem]

この発明に係るプログラムの同一箇所検出方式(a) 
 プログラムの同一ロジックを判断するための比較仕様
を特定するための比較仕様特定手段と。
Same part detection method of a program according to this invention (a)
A comparison specification specifying means for specifying a comparison specification for determining whether programs have the same logic.

(′b)この比較仕様に基づいてプログラムの各箇所を
比較する比較手段と。
('b) comparison means for comparing each part of the program based on this comparison specification;

(0)  比較の結果、同一箇所に対して、識別処理や
、まとめ処理々どの所定の処理を行なう処理手段と。
(0) Processing means that performs predetermined processing such as identification processing and grouping processing on the same location as a result of the comparison.

を備えたものである。It is equipped with the following.

〔作用〕[Effect]

この発明にかけるプログラムの同一箇所検出方式は、比
較手段が比較仕様特定手段によシ峙定された比較仕様に
基づいてプログラムの各ステップを比較してゆくことに
よタ同−箇所を判別する。
In the method for detecting the same parts of programs according to the present invention, the comparing means determines the same parts by comparing each step of the program based on the comparison specification determined by the comparison specification specifying means. .

そして処理手段によシ、識別やまとめを行ない。Then, the processing means performs identification and summarization.

モジュールの保守・修正を容易にする。Facilitates maintenance and modification of modules.

〔実施例〕〔Example〕

以下に、この発明の一実施例t−図について!52明す
る。第1図において、(4)は同一ロジックの自動検出
を行なうソフトウェア、(5)は検出対象となるモジエ
ール、(6)は同一ロジックとみなすステップ数N(こ
の数字以上の命令シーケンスが全く同一の時、同一ロジ
ックとみなし検出の対象とする)。
Below is a diagram of one embodiment of this invention! 52 will be revealed. In Figure 1, (4) is the software that automatically detects the same logic, (5) is the module to be detected, and (6) is the number of steps N that are considered to be the same logic (instruction sequences exceeding this number are exactly the same). (At the same time, it is considered to be the same logic and is subject to detection).

(1)は4)のソフトウェア実行後に出力される結果で
ある。
(1) is the result output after executing the software in 4).

(21,(31は(4)のソフトウェアによシ同一とみ
なされたロジックである。(71,(8)は同一とみな
されたロジック(2)、(3)の各行の先頭につけられ
た表示印である。
(21, (31) are the logics that are considered to be the same by the software in (4). (71, (8) are the logics that are considered to be the same and are added to the beginning of each line in (2) and (3). It is a display mark.

次に実施例の動作について第2図を使って説明する。Next, the operation of the embodiment will be explained using FIG. 2.

同一ロジック自動検出ソフトウェアは、まず対象のモジ
ュールから1ステツプの命令を取シ出しこの1ステツプ
の命令とこの命令以降の1ステンプの命令とを比較し、
同一のものをサーチする。
The same logic automatic detection software first extracts a 1-step instruction from the target module and compares this 1-step instruction with the 1-step instruction after this instruction.
Search for the same thing.

同一の命令が検出されると、それぞれの命令以降の指定
されたNステラプ分(実行時、何個同一シーケンスの命
令が続いたら同一ロジックとみ慶すかの、何個という指
定分)′f:比較し、同−麿ら。
When the same instruction is detected, the specified number of N staplings after each instruction (how many instructions in the same sequence must continue during execution to be considered as the same logic)'f: Comparison And Maro et al.

このソフトウェア実行結果としてのアウトプットに(一
般にはりスティング)、同一ロジックを他から識別する
表示印を表示して、出力する。
The output as a result of this software execution (generally stamping) is displayed with a display mark that distinguishes the same logic from others, and is output.

なか、上記実施例では、同一ロジックを検出した所まで
を述べたが、第3図に示すように、この結果をもとに同
一ロジックをまとめて一個にしてもよい。この場合は、
まとめた結果が従来のシーケンスを乱さないように、C
ALL文などによシサブルーチン形式でロジックXが呼
ばれるようにする必要がある。
In the above embodiment, the detection of the same logic was described, but as shown in FIG. 3, the same logic may be combined into one based on this result. in this case,
To ensure that the combined results do not disturb the conventional sequence, C
Logic X needs to be called in the form of a system subroutine using an ALL statement or the like.

また上記実施例では、比較仕様として、ステップ数のみ
を例にしたが、これにあわせて以下のような比較仕様も
考えられる。
Further, in the above embodiment, only the number of steps is used as an example of the comparative specification, but the following comparative specifications can also be considered.

■ コメント行は無視して比較する。■ Ignore comment lines and compare.

■ −行中にあるコメント部は無視して比較する。■ - Ignore the comment part in the line and compare.

■ ラベル行は無視して比較する。■ Ignore the label line and compare.

■ −行中にあるラベル部は無視して比較する。■ - Ignore the label part in the line and compare.

なカ・、特開昭63−65532には、共通アセンブラ
命令列の削除方式として、同一ロジックがあるとき、こ
れを自動的に検出して削除する方式が開示されているが
、この技術の目的とするところはコンパイラiどが翻訳
する際に冗長なアセンブラ命令列が発生してしまうこと
に鑑みて、この冗長なアセンブラ命令列を抽出し不要で
あることを確認したうえで削除してしまうというもので
、いわゆる、目的プログラムの最適化手法の一例である
Japanese Patent Application Laid-Open No. 63-65532 discloses a method for automatically detecting and deleting identical logic when there is a common assembler instruction sequence, but the purpose of this technology is This is because redundant assembler instructions are generated when the compiler i translates them, so it extracts these redundant assembler instructions, confirms that they are unnecessary, and then deletes them. This is an example of a so-called target program optimization method.

つまり、目的プログラムのコードからこの最適化手法に
よシ、無駄なコードを除き、処理速度の向上を図るもの
である。これに対し、この発明に係る方式は、ソースプ
ログラムの作成、修正、デパック時にわいて、ソースプ
ログラムの同一箇所を発見する方式でアク、これによシ
ブログラミングの効率化と、製品の品質向上を図るもの
でTo5゜その目的と効果を異にするものである。
In other words, by using this optimization method, useless code is removed from the code of the target program to improve processing speed. On the other hand, the method according to the present invention detects the same parts of the source program when creating, modifying, and depacking the source program, thereby improving the efficiency of sysprogramming and improving the quality of the product. They have different purposes and effects.

〔発明の効果〕〔Effect of the invention〕

以上のように、この発明によれば、同一ロジックを検出
し、これに所定の処理をすることにょタブログラムの管
理が容易になシ生産性1品質(品質はステップ量が少な
いほど高い)、保守性を向上させる効果がある。
As described above, according to the present invention, it is possible to easily manage tablograms by detecting the same logic and performing predetermined processing on it. This has the effect of improving maintainability.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は、この発明の一実施例による同一ロジック自動
検出方式を示す図。 第2図は、実際の同一ロジック自動検出プログラムの流
れ図。 第3図は、この発明の他の実施例を示す図。 第4図は、従来の同一ロジックの状態を示す図。
FIG. 1 is a diagram showing a same logic automatic detection method according to an embodiment of the present invention. FIG. 2 is a flowchart of an actual identical logic automatic detection program. FIG. 3 is a diagram showing another embodiment of the invention. FIG. 4 is a diagram showing the state of the same conventional logic.

Claims (1)

【特許請求の範囲】 以下の要素を有するプログラムの同一箇所検出方式 (a)プログラムの比較仕様を特定するための比較仕様
特定手段、 (b)比較仕様に基づいてプログラムの各箇所を比較す
る比較手段、 (c)比較手段により同一箇所が判明したとき、同一箇
所に対して所定の処理を行なう処理手段。
[Claims] A method for detecting the same part of a program having the following elements: (a) Comparison specification specifying means for specifying a comparison specification of a program; (b) Comparison for comparing each part of a program based on the comparison specification. (c) Processing means for performing predetermined processing on the same location when the same location is found by the comparison means.
JP1217672A 1989-08-24 1989-08-24 Detection system for same area of program Pending JPH0380327A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1217672A JPH0380327A (en) 1989-08-24 1989-08-24 Detection system for same area of program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1217672A JPH0380327A (en) 1989-08-24 1989-08-24 Detection system for same area of program

Publications (1)

Publication Number Publication Date
JPH0380327A true JPH0380327A (en) 1991-04-05

Family

ID=16707914

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1217672A Pending JPH0380327A (en) 1989-08-24 1989-08-24 Detection system for same area of program

Country Status (1)

Country Link
JP (1) JPH0380327A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011203960A (en) * 2010-03-25 2011-10-13 Fujitsu Ltd Method and device for compiling template
JP2013513868A (en) * 2009-12-09 2013-04-22 ザ マスワークス, インク Normalized version of reuse candidates in graphical state transition diagram model
US9424005B1 (en) 2009-12-09 2016-08-23 The Mathworks, Inc. Templatized component
US10365897B1 (en) 2012-05-23 2019-07-30 The Mathworks, Inc. Model ring component

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013513868A (en) * 2009-12-09 2013-04-22 ザ マスワークス, インク Normalized version of reuse candidates in graphical state transition diagram model
US9424005B1 (en) 2009-12-09 2016-08-23 The Mathworks, Inc. Templatized component
US9864588B2 (en) 2009-12-09 2018-01-09 The Mathworks, Inc. Canonicalized versions of reuse candidates in graphical state diagrams
JP2011203960A (en) * 2010-03-25 2011-10-13 Fujitsu Ltd Method and device for compiling template
US10365897B1 (en) 2012-05-23 2019-07-30 The Mathworks, Inc. Model ring component

Similar Documents

Publication Publication Date Title
DE68919069D1 (en) Method and device for error detection and correction in a computer system operating according to the overlapped control method.
CN106445618A (en) Automatic database updating method
JPS63238630A (en) Interruption controller for microprocessor
JP2780702B2 (en) Production control system and production control method
JPH0380327A (en) Detection system for same area of program
CN108228232B (en) Automatic repairing method for circulation problem in program
JPS6051980A (en) On-line pattern recognizing device
JPS61259341A (en) Loop detecting processing system
JPH1139363A (en) Data verification system
DE59900141D1 (en) Process for secure data processing and a computer system
JP2868127B2 (en) Blank reading device in lexical analysis
JPS6272032A (en) Graphing method for software manufacture state
CN117666459A (en) Comparison method and system of ladder diagram control program
CN116089486A (en) Analysis method and device for detection data of relay protection device
WO2005033873A3 (en) Method and system for processing a sequence of instructions
CN114048524A (en) Multi-direction text comparison method
JPH04312131A (en) Job executing control system
JPH01295336A (en) Optimization system for critical section
JPH11195572A (en) Production control system and method
JPS6386029A (en) Data processing method
JPH03296825A (en) Preregistering system for declaration information
CN114924852A (en) Interruption data competition model detection method based on univariate access sequence mode
JPH01246638A (en) Area error decision system for write instruction
JPS62228357A (en) Achievement collecting device in production control system
JPH06222939A (en) Testing system for plural pipelines