JPH03288226A - Software evaluating method - Google Patents

Software evaluating method

Info

Publication number
JPH03288226A
JPH03288226A JP2088221A JP8822190A JPH03288226A JP H03288226 A JPH03288226 A JP H03288226A JP 2088221 A JP2088221 A JP 2088221A JP 8822190 A JP8822190 A JP 8822190A JP H03288226 A JPH03288226 A JP H03288226A
Authority
JP
Japan
Prior art keywords
information
program
maintainability
evaluation
output
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
JP2088221A
Other languages
Japanese (ja)
Inventor
Ichiro Naito
一郎 内藤
Hirobumi Danno
博文 団野
Kenichi Ota
健一 太田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Microcomputer System Ltd
Hitachi Ltd
Original Assignee
Hitachi Ltd
Hitachi Microcomputer Engineering Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd, Hitachi Microcomputer Engineering Ltd filed Critical Hitachi Ltd
Priority to JP2088221A priority Critical patent/JPH03288226A/en
Publication of JPH03288226A publication Critical patent/JPH03288226A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To enable a user to concretely grasp the problems and to easily work out countermeasures by analyzing a program to detect the description information included in the program and having the defective maintenance property based on the analysis information and outputting the relative information showing the factor of the defective maintenance property. CONSTITUTION:A program is analyzed and the description information included in the program and having the defective maintenance property is detected based on the analysis information. Then this program description information is outputted with relation secured to the information showing the problem of the maintenance property. For instance, the check is carried out based on the basis of standardization for each word/phrase. Then the corresponding line No and message are stored in a memory and outputted when a word or phase opposed to the standardization reference rule is detected. Thus a user can concretely grasp a specific problem produced in a specific area of a program in regard of the maintenance property and can work out the countermeasure.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、ソフトウェアの生産性向上のための方法に係
わり、特に開発プログラムの保守容易性の評価や、保守
性の悪い個所の検出、変更に好適なソフトウェア評価方
法に関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a method for improving software productivity, and in particular, the present invention relates to a method for improving the productivity of software, and in particular, to evaluating the maintainability of a developed program, and detecting and changing parts with poor maintainability. This invention relates to a software evaluation method suitable for

[従来の技術〕 ソフトウェアの保守作業を効率化するアプローチの1つ
として、予め将来の保守作業の効率を考慮した、保守性
の良いプログラムの作成の方向づけを行うアプローチが
ある。
[Prior Art] One of the approaches to make software maintenance work more efficient is to consider in advance the efficiency of future maintenance work and create a program with good maintainability.

このためには作成したプログラムの保守の容易さを自動
的に検査・評価する手段があれば、保守性の良いプログ
ラム作成の方向付けが容易になり、又、他部署や外注先
からのソフトウェア受は入れ検査にも使用することが出
来る。
For this purpose, if there is a means to automatically inspect and evaluate the ease of maintenance of created programs, it will be easier to create programs with good maintainability, and it will also be possible to easily determine the direction of creating programs with good maintainability. It can also be used for inspection.

この目的に関連する従来技術の1つにはプログラムを解
析して、その中のGo  TO文比率やプログラム・サ
イズなど保守性の指標となる情報を計測して出力するツ
ールの開発例がある。
One of the conventional techniques related to this purpose is the development of a tool that analyzes a program and measures and outputs information that is an index of maintainability, such as the ratio of Go TO statements in the program and the program size.

これは、例えば、[中村、他:IMAPシステム(9)
−ソフトウェア品質保証技術−情報処理学会第31口金
国大会講演論文集、p505〜P506(昭和60年9
月)」に述べられている。
For example, [Nakamura et al.: IMAP system (9)]
- Software quality assurance technology - Information Processing Society of Japan 31st Annual Conference Proceedings, p505-506 (September 1985)
month)”.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

前記の従来技術では、プログラム内の保守性に問題のあ
る特定の個所とその問題点を関連付けて利用者に提示す
ることが出来なかった。従って、利用者はプログラム内
のどの個所にどのような問題があるかを具体的に知るこ
とが難しかった。
In the above-mentioned conventional technology, it is not possible to associate a specific part of a program with a maintainability problem with the problem and present it to the user. Therefore, it is difficult for the user to know specifically what kind of problem exists in which part of the program.

又、前記の従来技術は、半完成プログラム−即ちプログ
ラムパターン・部品−を使用したプログラム作成法を考
慮していないという問題があった。
Further, the above-mentioned conventional technology has a problem in that it does not take into consideration a method of creating a program using a semi-finished program, that is, a program pattern/component.

即ち、最近はプログラム作成に予め作成されたプログラ
ムパターン・部品を用い、これに追加コーディングを行
って、プログラムを完成させる方法が用いられる場合が
多い。前記の従来技術では、対象とするプログラムがパ
ターン・部品を利用しているかどうかを識別することが
できず、また対象とするプログラムのうちプログラムパ
ターン・部品による部分と追加コーディングの部分を区
別して各々のサイズ・比率を得ることや、保守性の評価
を行うことが出来ない。従って、プログラム作成者が実
際に追加コーディングした部分のみを対象として保守性
の評価を行うことやパターン・部品の利用率による保守
性の評価を行なうことが出来ず、プログラムの保守性を
向上させるための対策を立てることが難しかった。
That is, in recent years, a method is often used to create a program by using previously created program patterns and parts and performing additional coding on these to complete the program. In the above-mentioned conventional technology, it is not possible to identify whether the target program uses patterns or parts, and it is not possible to distinguish between the parts of the target program that are based on program patterns and parts and the parts that are additionally coded. It is not possible to obtain the size and ratio of the data or to evaluate maintainability. Therefore, it is not possible to evaluate maintainability only for the parts that the program creator has actually added coding, or to evaluate maintainability based on the usage rate of patterns and parts. It was difficult to come up with countermeasures.

又、前記の従来技術では、プログラムを構成する各内部
手続きの保守の容易さをプログラムの構造を表わした図
上にビジュアルに表示することが出来なかった。従って
利用者は保守性の特に悪い内部手続きを知り、その手続
きを保守性が向上するように書き換えることが難しかっ
た。
Further, in the above-mentioned conventional technology, it is not possible to visually display the ease of maintenance of each internal procedure constituting a program on a diagram showing the structure of the program. Therefore, it is difficult for users to know which internal procedures have particularly poor maintainability and to rewrite those procedures to improve maintainability.

又、前記の従来技術では、ソフトウェア全体の構造を示
すプログラム関係図上で各プログラム毎の保守の容易さ
をビジュアルに表示することが出来なかった。従って利
用者は保守性の特に悪いプログラムを知り、そのプログ
ラムを保守性が向上するように書き換えることが難しか
った。
Further, in the above-mentioned conventional technology, it is not possible to visually display the ease of maintenance of each program on a program relationship diagram showing the structure of the entire software. Therefore, it is difficult for users to know which programs have particularly poor maintainability and to rewrite those programs to improve maintainability.

さらに、前記の従来技術では、プログラム全体の記述を
変更することなく、プログラム内の文やその記述形式を
保守性が向上するように、例えば構造化プログラム用の
文や形式に自動的に書き換えたり、あるいはその部署で
標準と定めた文や形式に自動的に書き換えることが出来
なかった。また書き換えたプログラムの保守性の評価を
自動的に行なうことができなかった。従って、作成した
プログラムの保守性を向上させることが難しかつた。
Furthermore, in the above-mentioned conventional technology, the statements in the program and their description format are automatically rewritten to the statements and format for structured programs, for example, in order to improve maintainability without changing the description of the entire program. , or could not be automatically rewritten to the standard sentences and formats in that department. Furthermore, it was not possible to automatically evaluate the maintainability of rewritten programs. Therefore, it has been difficult to improve the maintainability of the created programs.

さらに、又、前記の従来技術では、開発した各プログラ
ムの保守性の評価情報を人やグループ別、あるいは時系
列に集計して、比較出力することが出来なかった。従っ
て、人やグループ別に、開発するプログラムの保守性の
向上策を立てることが難しかった。
Furthermore, with the above-mentioned conventional technology, it is not possible to aggregate the maintainability evaluation information of each developed program by person or group, or in chronological order, and output the results for comparison. Therefore, it has been difficult to formulate measures to improve the maintainability of the programs being developed for each person or group.

本発明の第1の目的は、利用者がプログラム内のどの個
所に保守性に関してどのような問題があるかを具体的に
知り、対策を立てることを支援すルタメのソフトウェア
評価方法を提供することにある。
The first object of the present invention is to provide a Rutame software evaluation method that assists the user in knowing specifically where in a program there is a problem regarding maintainability and taking countermeasures. It is in.

本発明の第2の目的は、プログラムの保守の容易さの評
価を行ない、プログラムの保守性の向上策を立てること
を支援するソフトウェア評価方法を提供することにある
A second object of the present invention is to provide a software evaluation method that evaluates the maintainability of a program and supports the formulation of measures to improve the maintainability of the program.

本発明の第3の目的は、プログラムのプログラムパター
ン・部品を使用したプログラムの開発をする場合のプロ
グラム保守性の評価や、プログラム保守性向上の対策を
立てることを支援するためのソフトウェア評価方法を提
供することにある。
A third object of the present invention is to provide a software evaluation method for supporting the evaluation of program maintainability when developing programs using program patterns and components, and for developing measures to improve program maintainability. It is about providing.

本発明の第4の目的は、利用者がプログラム内の保守性
の特に悪い内部手続きを知り、対策を立てることを容易
にするソフトウェア評価方法を提供することにある。
A fourth object of the present invention is to provide a software evaluation method that makes it easy for a user to know internal procedures in a program that have particularly poor maintainability and to take countermeasures.

本発明の第5の目的は、利用者が保守性の特に悪いプロ
グラムを知り、対策を立てることを容易にするソフトウ
ェア評価方法を提供することにある。
A fifth object of the present invention is to provide a software evaluation method that makes it easy for users to know which programs have particularly poor maintainability and to take countermeasures.

本発明の第6の目的は、プログラム全体の構造を変更す
ることなく、作成したプログラムの保守性を向上させる
ことを容易にするソフトウェア評価方法を提供すること
にある。
A sixth object of the present invention is to provide a software evaluation method that facilitates improving the maintainability of a created program without changing the structure of the entire program.

本発明の第7の目的は、人やグループ別に、開発するプ
ログラムの保守性の向上策を立てることを容易にするソ
フトウェア評価方法を提供することにある。
A seventh object of the present invention is to provide a software evaluation method that facilitates formulating measures to improve the maintainability of programs to be developed for each person or group.

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

上記の第1の目的を達成するため、本発明のソフトウェ
ア評価方法は、プログラムを解析して、その解析情報に
より、プログラム内の保守性に問題のあるプログラム記
述を検出し、保守性に関する問題を示す情報と関連づけ
て出力することに特徴がある。
In order to achieve the above first objective, the software evaluation method of the present invention analyzes a program, uses the analysis information to detect program descriptions with maintainability problems in the program, and solves maintainability problems. It is distinctive in that it is output in association with the information shown.

又、上記の保守性に問題のあるプログラム記述を含むソ
ースプログラムの行を、保守性に関する問題を示す情報
と対応づけて出力することに特徴がある。
Another feature is that lines of the source program that include program descriptions with problems in maintainability are output in association with information indicating problems in maintainability.

又、上記の保守性に問題のあるプログラム記述を含む行
に対し、保守性に関する問題を示す情報を対応づけて、
該ソースプログラムを出力することに特徴がある。
Additionally, information indicating the maintainability problem is associated with the line containing the program description with the maintainability problem, and
The feature is that the source program is output.

上記の第2の目的を達成するために、本発明のソフトウ
ェア評価方法は、プログラムを解析して、その解析情報
により、プログラム内の保守性に問題のあるプログラム
記述情報の検出や、あるいは保守性の指標となるプログ
ラム記述情報の有無や数を計測し、その計測情報をもと
に定められた評価基準に従って、評価点を算出し、図表
形式で出力することに特徴がある。
In order to achieve the above second objective, the software evaluation method of the present invention analyzes a program and uses the analysis information to detect program description information in the program that has maintainability problems or It is characterized by measuring the presence or absence and number of program description information that serves as an index, calculating evaluation points based on the measured information according to established evaluation criteria, and outputting the results in a chart format.

又、上記の検出・計測対象となるプログラム記述情報種
別あるいは評価基準を利用者が設定・変更することに特
徴がある。
Another feature is that the user sets and changes the program description information type or evaluation criteria to be detected and measured.

又、上記の検出・計測対象とするプログラム記述情報は
、保守性に問題のあると定めた文、即ち、GOTo  
文、ALTER文、あるいは#A$に反すると定めた文
などのうち、少なくともいずれかを含むことに特徴があ
る。
In addition, the program description information to be detected and measured is a statement that has a maintainability problem, that is, GOTo
It is characterized by including at least one of the following: a sentence, an ALTER sentence, or a sentence that is determined to be contrary to #A$.

又、上記の検出・計測対象とするプログラム記述情報は
、最後にEND−IFが付けられていないIF文、TH
EN、ELSEが共に付けられてないIF文などの、保
守性に問題があると定めた文記法のうち、少なくともい
ずれかを含むことに特徴がある。
In addition, the program description information to be detected and measured above is an IF statement without END-IF at the end, TH
It is characterized by including at least one of the sentence notations that are determined to have problems in maintainability, such as an IF statement without both EN and ELSE.

又、上記の検出・計測対象とするプログラム記述情報は
、行くさきがプログラムの上方にあるGo  To文や
PERFORM文などの、保守性に問題のあると定めた
実行文のうち、少なくともいずれかを含むことに特徴が
ある。
In addition, the program description information to be detected and measured above includes at least one of the executable statements determined to have maintainability problems, such as Go To statements and PERFORM statements located above the program. It is characterized by its inclusion.

又、上記の検出・計測対象とするプログラム記述情報は
、rtJtr;Jなど保守性に問題があると定めた字句
区切り情報のうち、少なくともいずれかを含むことに特
徴がある。
Further, the program description information to be detected and measured is characterized in that it includes at least one of lexical delimiter information determined to have problems in maintainability, such as rtJtr;J.

又、上記の検出・計測対象とするプログラム記述情報は
、同一行に複数の文を持つ箇所、IF文やPERFOR
M文等の内に含まれる字下げ対象文の内で、字下げを行
なっていない文、あるいは1字下げ対象範囲から出た文
の内で字さげから戻していない文、などのプログラム内
の記述位置に関し保守性の問題があると定めた情報のう
ち、少なくともいずれかを含むことに特徴がある。
In addition, the program description information to be detected and measured above includes locations with multiple statements on the same line, IF statements, and PERFOR statements.
In the program, there are sentences that are not indented among the indented sentences included in M sentences, etc., or sentences that are out of the one indentation target range but are not returned from the indented position. It is characterized by including at least one of the information determined to have maintainability problems regarding the description position.

又、上記の計測対象とする情報は、プログラム内部手続
きの行数あるいは文数、あるいはそれらの少なくともい
ずれかの平均値あるいは最大値等のプログラム内部手続
きサイズの情報の少なくともいずれかを含むことに特徴
がある。
Furthermore, the above information to be measured includes at least one of the number of lines and sentences of the program internal procedure, and information on the size of the program internal procedure, such as the average value or maximum value of at least one of them. There is.

又、上記の計測対象とするプログラム記述情報は、プロ
グラム内のコメント行数あるいは比率の少なくともいず
れかを含むことに特徴がある。
Further, the program description information to be measured is characterized in that it includes at least one of the number of comment lines or the ratio of comment lines in the program.

又、上記の計測対象とする情報は、プログラムの行数1
手続き部行数、プログラム内の文数、手続き部内の実行
文数、などのプログラムサイズレこ関する情報の少なく
ともいずれかを含むことシこ特徴がある。
Also, the information to be measured above is the number of lines of the program 1
It is characterized by containing at least one of information related to the program size, such as the number of lines in the procedure division, the number of statements in the program, and the number of executable statements in the procedure division.

上記の第3の目的を達成するため、本発明のソフトウェ
ア評価方法は、プログラムを解析して、予め作成された
プログラムパターン・部品の該プログラム中での使用の
有無の検出、あるシ)番よプログラムパターン・部品に
より部分と追加コーディングの部分の識別をコメント内
の識別情報番こより行ない、プログラムパターン・部品
の使用の有無の出力、あるいは追加コーディングの部分
あるし1はプログラムパターン・部品の行数、実行文数
、或いはそれらの比率等のサイズ情報の出力、あるいは
、検出された追加コーディング部分内のプログラムに対
する、前記の方法により保守性の評価・出力のうち少な
くともいずれかを行なうことに特徴がある。
In order to achieve the above third objective, the software evaluation method of the present invention analyzes a program and detects whether a program pattern/part created in advance is used in the program. Identification of parts and additional coding parts by program pattern/parts is done from the identification information number in the comment, and output of whether or not the program pattern/parts are used, or additional coding part or 1 is the number of lines of the program pattern/parts. , outputting size information such as the number of executable statements or their ratio, or evaluating and outputting the maintainability of the program in the detected additional coding part using the method described above. be.

又、上記のプログラム解析情報に対するプログラムパタ
ーン・部品による部分と追加コーディングの部分の識別
は、該当パターンに対応したプログラムパターン・部品
による部分と追加コーディングの部分の識別情報を入力
し、その情報を用いて、識別することにより行なうこと
に特徴がある。
In addition, to identify the program pattern/component part and the additional coding part for the above program analysis information, input the identification information of the program pattern/component part and the additional coding part corresponding to the corresponding pattern, and use that information. It is characterized by the fact that it is done by identifying.

又、上記のプログラムパターン・部品による部分・追加
コーディングの部分のサイズに関する情報の取得、ある
いは追加コーディング部分の保守性の評価は、該当パタ
ーン・部分に関する保守性の指標となる計測情報を入力
し、その情報を用いて、算出することにより行なうこと
を特徴とする。
In addition, to obtain information regarding the size of the above program pattern/part part/additional coding part, or to evaluate the maintainability of the additional coding part, input measurement information that is an index of maintainability regarding the corresponding pattern/part, It is characterized in that it is performed by calculating using that information.

上記の第4の目的を達成するため、本発明のソフトウェ
ア評価方法は、前記のプログラムの解析に於て、少なく
とも各内部手続きの開始情報及び、内部手続き間の呼出
し文を検出することにより、プログラム内の内部構造を
識別し、解析情報によるプログラムの保守性の指標とな
る箇所の情報の計測、及びその計測情報に基づく評価点
の付与を前記の方法で各内部手続き単位に行ない、前記
の内部構造情報に基づいてプログラム内構造図情報を作
成しその中に各内部手続きごとの評価点を色や形状で区
別してビジュアルに出力することに特徴がある。
In order to achieve the fourth objective, the software evaluation method of the present invention detects at least start information of each internal procedure and call statements between internal procedures in analyzing the program. Identify the internal structure of the internal procedure, measure the information of the part that is an index of program maintainability using analysis information, and assign evaluation points based on the measurement information to each internal procedure unit using the method described above. It is unique in that it creates internal program structure diagram information based on structural information and visually outputs the evaluation points for each internal procedure, distinguishing them by color or shape.

上記の第5の目的を達成するため、本発明のソフトウェ
ア評価方法は、指定されたプログラム群を構成する各プ
ログラムに対し、前記の方法でプログラム解析・保守性
情報の計測、評価点の付与を行なうと共に、各プログラ
ム内の他プログラム呼び出し文によりプログラム間の呼
び出し関係を検出し、該呼び出し関係情報によりプログ
ラム間の関連図情報を作成し、その中に各プログラムご
との評価点を色や形状で区別してビジュアルに出力する
ことに特徴を持つ。
In order to achieve the above-mentioned fifth objective, the software evaluation method of the present invention measures program analysis/maintainability information and assigns evaluation points to each program constituting a specified program group using the above-described method. At the same time, it detects calling relationships between programs using other program calling statements in each program, creates relationship diagram information between programs based on the calling relationship information, and displays evaluation points for each program in color and shape. It is characterized by distinguishing and outputting it visually.

上記の第6の目的を達成するため、本発明のソフトウェ
ア変換方法は、プログラムを解析して、その解析情報に
より、プログラム内の保守性に問題のあるプログラム記
述とその問題の情報を前記の方法で検出し、該解析情報
を定められた方法で変更し、その変更した解析情報から
プログラムを再生して出力することに特徴を持つ。
In order to achieve the above-mentioned sixth object, the software conversion method of the present invention analyzes a program, and uses the analysis information to convert a program description with a maintainability problem in the program and information on the problem to the above-mentioned method. The feature is that the analysis information is detected using a predetermined method, and the program is reproduced and output from the changed analysis information.

又、プログラムを解析して、最後にEND−IFが付け
られてぃな1.N I F文、THEN、ELSEが共
に付けられていないIF文の少なくともいずれかを検出
し、付けられていない場合はEND−IF、THEN、
ELSE(7)少なくともいずれかの情報を解析情報に
挿入して、その変更した解析情報からプログラムを再生
成して出力することに特徴を持つ。
Also, I analyzed the program and found that END-IF was added at the end.1. N Detects at least one of the IF statements that do not include an IF statement, THEN, or ELSE, and if they are not attached, END-IF, THEN,
ELSE (7) The feature is that at least one of the pieces of information is inserted into the analysis information, and a program is regenerated and output from the changed analysis information.

又、上記のプログラム解析情報から、「、」。Also, from the program analysis information above, ",".

「;」などの保守性に問題があると定めた字句区切りの
プログラム記述情報のうち、少なくともいずれかの使用
箇所を検出し、使用されていればこれを解析情報がら削
除して、その変更した解析情報からプログラムを再生成
して出力することに特徴を持つ。
Detect the use of at least one of the lexical delimiter program description information that is determined to have maintainability problems, such as ";", and if it is used, delete it from the analysis information and change it. It is characterized by regenerating and outputting a program from analysis information.

又、上記のプログラム解析情報から、同一行に複数の文
を持つ箇所、IFやPERFORM文等の内に含まれる
字下げ対象文の内で、字下げを行なっていない文、ある
いは、字下げ対象範囲から出た文の内で字さげがら戻し
ていない文などプログラムの記述位置に関する保守性に
問題のあると定めたプログラム記述情報を検出し、同一
行に複数の文を持つ箇所の2番目以後の文の別行化、字
下げ対象文の内で、字下げを行なっていない文の先頭カ
ラム位置の字下げガラム位置への変更、字下げ対象範囲
から出た文の内で字さげから戻していない文の先頭カラ
ム位置の字下げ戻りのカラム位置への変更等の少なくと
も何れかの変更を行なって。
In addition, from the above program analysis information, we have found that there are multiple statements on the same line, sentences that are not indented among the sentences that are included in IF and PERFORM statements, or sentences that are targeted for indentation. Detects program description information that determines that there is a maintainability problem regarding the program description position, such as a sentence that does not return the indentation in a sentence that has come out of the range, and detects the program description information that determines that there is a problem with maintainability regarding the position of the program description, and detects the second and subsequent sentences in the position where there are multiple sentences on the same line. Converting a sentence to a separate line, changing the first column position of a non-indented sentence within the indentation target sentence to the indentation column position, returning from indentation within a sentence that has come out of the indentation target range Make at least one of the following changes, such as changing the position of the first column of the sentence that has not been changed to the column position of the indentation return.

この変更した解析情報からプログラムを再生成して出力
することに特徴を持つ。
The feature is that the program is regenerated and output from this changed analysis information.

又、上記のように保守性の向上を目的として自動変更し
たプログラムに対し、前記の方法により、(1)プログ
ラム内の保守性に問題のあるプログラム記述情報の検出
や、あるいは保守性の指標となるプログラム記述情報を
検出して、それらの情報を計測し、その計測情報をもと
に定められた評価基準に従って、評価点を与え、図表形
式で出力するか、(2)プログラム内の保守性に問題の
あるプログラム記述情報とその原因を検出し、関連づけ
て出力すること、の少なくともいずれかを行なうことに
特徴がある。
In addition, for programs that have been automatically modified for the purpose of improving maintainability as described above, the above method can be used to (1) detect program description information that has maintainability problems in the program, or use it as an index of maintainability; (2) Maintainability within the program A feature of the present invention is that it detects problematic program description information and its causes, and outputs them in association with each other.

上記の第7の目的を達成するため、本発明のソフトウェ
ア評価方法は、開発した各プログラムに対し、前記の方
法でプログラム解析、保守性情報の計測、評価点の算出
を行なって保守性の評価情報を得、その評価情報を人や
グループ別、あるいは時系列毎に集計して、比較呂カす
ることに特徴がある。
In order to achieve the seventh objective, the software evaluation method of the present invention analyzes maintainability of each developed program by performing program analysis, measuring maintainability information, and calculating evaluation points using the methods described above. It is characterized by obtaining information, aggregating the evaluation information by person or group, or by time series, and comparing it.

〔作用〕[Effect]

本発明は、プログラムを解析して、その解析情報により
、プログラム内の保守性に問題のあるプログラム記述を
検出し、保守性に関する問題を示す情報と関連づけて出
力する。従って、利用者は対象プログラム内の保守性に
問題のある個所とその問題点をたやすく、かつ具体的に
知ることが出来き、対策を立てることができる。
The present invention analyzes a program, uses the analysis information to detect a program description in the program that has a maintainability problem, and outputs the detected program description in association with information indicating the maintainability problem. Therefore, the user can easily and concretely know the parts of the target program that have maintainability problems and the problems, and can take countermeasures.

本発明は、プログラムを解析して、その解析情報により
、プログラム内の保守性に問題のあるプログラム記述情
報や、あるいは保守性の指標となるプログラム記述を検
出して、それらの情報の有無や数を計測し、その計測情
報をもとに定められた評価基準に従って、評価点を算出
し1図表形式で出力する。従って、利用者はプログラム
の保守性の評価値を自動的に、かつ判りやすい図表形式
で得ることができるのでプログラムの保守性の評価や、
保守性向上の対策を容易に行なうことができる。
The present invention analyzes a program, uses the analysis information to detect program description information in the program that has problems with maintainability, or program descriptions that are indicators of maintainability, and detects the presence or absence of such information and the number of such information. is measured, and based on the measurement information, evaluation points are calculated according to established evaluation criteria and output in a single chart format. Therefore, the user can automatically obtain the evaluation value of the maintainability of the program in an easy-to-understand chart format, so the user can evaluate the maintainability of the program,
Measures to improve maintainability can be easily taken.

本発明は、プログラムを解析して、プログラムパターン
・部品の該プログラム中での使用の有無の検出、あるい
はプログラムパターン・部品による部分と追加コーディ
ングの部分の識別をコメント内の識別情報により行ない
、この情報に基づきプログラムパターン・部品の使用の
有無の出力、あるいは追加コーディングの部分あるいは
プログラムパターン・部品の部分の行数、実行文数、或
いはそれらの比率等のサイズ情報の出力、あるいは、検
出された追加コーディング部分の保守性の評価を出力す
ることが出来る。従って、利用者はプログラムパターン
・部品を利用したプログラム開発におけるプログラム保
守性の評価や保守性向上の対策をたやすく立てることが
できる。
The present invention analyzes a program, detects whether a program pattern/component is used in the program, or identifies a part based on a program pattern/component and a part with additional coding using identification information in comments. Based on the information, it outputs whether or not a program pattern/component is used, or outputs size information such as the number of lines, the number of executable statements, or their ratio of the additional coding part or the program pattern/component part, or the detected It is possible to output the maintainability evaluation of the additional coding part. Therefore, the user can easily evaluate program maintainability and take measures to improve maintainability in program development using program patterns and components.

また、本発明は、プログラムパターン・部品による部分
と追加コーディングの部分の識別を、該当パターンに対
応したプログラムパターン・部品による部分と追加コー
ディングの部分の識別情報を入力し、その情報により行
なうことも出来る。
Furthermore, the present invention can input identification information of the program pattern/component part and the additional coding part corresponding to the corresponding pattern, and use that information to identify the program pattern/component part and the additional coding part. I can do it.

また、本発明は、該当パターン・部品に関する保守性の
指標となる計測情報を入力し、その情報を用いて、プロ
グラムパターン・部品による部分・追加コーディングの
部分のサイズに関する情報の取得、あるいは追加コーデ
ィング部分の保守性の評価を行なうことも出来る。
In addition, the present invention inputs measurement information that is an index of maintainability regarding a corresponding pattern/component, and uses that information to obtain information regarding the size of a program pattern/component part/additional coding part, or to obtain additional coding It is also possible to evaluate the maintainability of parts.

本発明は、各内部手続きの開始情報及び、内部手続き間
の呼出し文を検出することにより、プログラム内の内部
構造を識別し、各内部手続き単位にプログラムの保守性
の評価を行ない、前記の内部構造情報に基づいてプログ
ラム内構造図情報を作成し、その中に各内部手続きごと
の評価点を色や形状で区別してビジュアルに出力する。
The present invention identifies the internal structure within a program by detecting the start information of each internal procedure and the call statements between internal procedures, evaluates the maintainability of the program for each internal procedure, and In-program structure diagram information is created based on the structure information, and the evaluation points for each internal procedure are differentiated by color and shape and output visually.

従って、利用者は対象プログラム内の特に保守性の悪い
内部手続きを容易に知り、対策を立てることができる。
Therefore, the user can easily learn about particularly poorly maintainable internal procedures in the target program and take countermeasures.

本発明は、指定されたプログラム群を構成する各プログ
ラムに対し、保守性の評価を行なうと共に、各プログラ
ム内の他プログラム呼び出し文によりプログラム間の呼
び出し関係を検出し、この呼び出し関係情報によりプロ
グラム間の関連図情報を作成し、その中に各プログラム
ごとの評価点を色や形状で区別してビジュアルに出力す
る。従って、利用者は特に保守性の悪いプログラムを容
易に知り、対策を立てることが出来る。
The present invention evaluates the maintainability of each program constituting a specified program group, detects calling relationships between programs using other program call statements in each program, and uses this calling relationship information to The system creates related diagram information and visually outputs the evaluation points for each program, distinguishing them by color and shape. Therefore, the user can easily know which programs have particularly poor maintainability and can take countermeasures.

°本発明は、プログラムを解析して、その解析情報によ
り、プログラム内の保守性に問題のあるプログラム記述
とその問題の情報を前記の方法で検出し、該解析情報を
定められた方法で変更し、その変更した解析情報からプ
ログラムを再生成して出力する。また、上記のように保
守性の向上を目的として自動変更したプログラムに対し
、(1)プログラム内の保守性に問題のあるプログラム
記述情報の検出や、あるいは保守性の指標となるプログ
ラム記述情報を検出して、それらの情報を計測し、その
計測情報をもとに定められた評価基準に従って、評価点
を与え、図表形式による出力、(2)プログラム内の保
守性に問題のあるプログラム記述情報とその原因を検出
し、関連づけて出力、の少なくともいずれかを行なう。
°The present invention analyzes a program, uses the analysis information to detect a program description with a maintainability problem in the program and information about the problem, and changes the analysis information in a predetermined manner. Then, the program is regenerated and output from the changed analysis information. In addition, for programs that have been automatically modified for the purpose of improving maintainability as described above, (1) detection of program description information that has maintainability problems in the program, or program description information that is an index of maintainability, Detect and measure that information, give evaluation points based on the measurement information according to established evaluation criteria, and output in chart format. (2) Program description information that has maintainability problems in the program and its cause, and output the associated information.

従って、プログラム全体の構造を変更することなく、プ
ログラムを保守性が上がるように自動変換できると共に
、変換してプログラムの保守性を自動的に評価すること
ができる。
Therefore, the program can be automatically converted to improve maintainability without changing the structure of the entire program, and the maintainability of the program can be automatically evaluated after conversion.

本発明は、開発した各プログラムに対し、前記の方法で
プログラム解析、保守性情報の計測、評価点の算出を行
なって保守性の評価情報を得、その評価情報を人やグル
ープ別、あるいは時系列毎に集計して、比較出力する。
The present invention obtains maintainability evaluation information by performing program analysis, measuring maintainability information, and calculating evaluation points for each developed program using the method described above, and the evaluation information is divided by person, group, or time. Summarize each series and output for comparison.

従って、人やグループ別に、開発するプログラムの保守
性の向上策を立てることが容易になる。
Therefore, it becomes easy to formulate measures to improve the maintainability of the program being developed for each person or group.

〔実施例〕〔Example〕

以下本発明の一実施例を図面により説明する。 An embodiment of the present invention will be described below with reference to the drawings.

第1図は、本発明の第1の実施例における処理手順を示
す図、第2図は、本実施例のハードウエア環境を示す図
である。
FIG. 1 is a diagram showing a processing procedure in a first embodiment of the present invention, and FIG. 2 is a diagram showing a hardware environment of this embodiment.

第2図において、201はCPU、202はメモリ、2
03は入力装置、204は出力装置。
In FIG. 2, 201 is a CPU, 202 is a memory, 2
03 is an input device, and 204 is an output device.

205は外部記憶装置、206はデイスプレィ装置であ
る。
205 is an external storage device, and 206 is a display device.

本実施例のソフトウェア評価方法を第1図に従って説明
する。まず、外部記憶装置205内に蓄積されている評
価の対象とするプログラムから1行入力しくステップ1
01)、入力した行について分析する(ステップ103
)。
The software evaluation method of this embodiment will be explained with reference to FIG. First, in step 1, input one line from the program to be evaluated stored in the external storage device 205.
01), analyze the input line (step 103
).

第3図は、C0BOL言語で記述されたソースプログラ
ムの例、第4図は、行301を入力した時の分析結果を
メモリ内に記憶した例、第5図は。
FIG. 3 shows an example of a source program written in the COBOL language, FIG. 4 shows an example in which the analysis results obtained when line 301 is input are stored in memory, and FIG. 5 shows an example of a source program written in the COBOL language.

分析時にチエツクする標準化基準の規則の例、第6図は
、行単位の基準外を示すメツセージをメモリ内に記憶し
た例を示す。
FIG. 6, an example of the standardization standard rules to be checked at the time of analysis, shows an example in which messages indicating non-standards on a line-by-line basis are stored in memory.

入力した行を左から右へスペース以外の文字の集まりを
順次調べ、スペース記号及び「、」。
Check the input line sequentially from left to right for groups of characters other than spaces, including space symbols and ",".

「;」等の句切り記号により句切られた文字の集まり(
以下字句と呼ぶ)毎の、字句の始まりのカラム位置を字
句と1行入力毎に1ずつ計数する行番号と共にメモリ内
に記憶する。
A collection of characters separated by punctuation symbols such as ";" (
For each (hereinafter referred to as a token), the column position of the start of the token is stored in memory together with the token and the line number, which is counted by 1 for each input line.

例えば、第3図の行301では、rA L T E R
Jが行の先頭からのスペース記号以外の最初の字句で、
カラム15から始まっており、終わりはスペース記号に
より句切られているので、字句rALTER)(401
)は、符番「82」(402)、カラムr15」 (4
03)で、字句情報404としてメモリ内に記憶する。
For example, in row 301 of FIG. 3, rA L T E R
J is the first non-space token from the beginning of the line,
It starts in column 15 and is terminated by a space symbol, so the lexical rALTER) (401
) is code number ``82'' (402), column r15'' (4
03), it is stored in memory as lexical information 404.

また、例外的に行全体が注記(コメント)であることを
示す例えばC0BOL言語の記号「傘」がカラム7にあ
る場合、記号「傘」を字句、カラムを「7」とする字句
情報と、カラム「8」以後の行全体を1つの字句とする
字句情報を作成する。例えば。
In addition, if the symbol "umbrella" in the C0BOL language, which indicates that the entire line is an annotation (comment), is in column 7, lexical information that indicates that the symbol "umbrella" is a lexical and the column is "7", Create lexical information in which the entire line after column "8" is one lexical phrase. for example.

第3図の行302は、カラム7に記号「*」があるので
、ガラム8以後のスペースを含む行全体を1つの字句と
し、開始カラムはカラム「8」としてメモリ内に記憶す
る。
In line 302 of FIG. 3, since there is a symbol "*" in column 7, the entire line including spaces after garum 8 is treated as one token, and the starting column is stored in the memory as column "8".

次に、字句単位の標準化基準に基づき、チエツクを行な
い標準化基準規則に反する字句の場合、該当する符番と
メツセージをメモリ内に記憶すると同時に該当する字句
情報をメモリより削除する。
Next, a check is performed based on the standardization criteria for each lexical unit, and if the lexical phrase violates the standardization standard rules, the corresponding code number and message are stored in the memory, and at the same time, the corresponding lexical information is deleted from the memory.

例えば、第5図の例で示す規則501は「字句」に関す
る規則で、字句「、」の使用を禁止することを示す。第
4図の例で示す字句情報405が第5図で示す規則50
1により使用を禁止されている字句の情報であることが
わかり、第6図の例で示す行番号とメツセージから構成
する行メツセージ601をメモリ内に記憶する。その後
、第4図の例で示す字句情報405をメモリから削除す
る。
For example, rule 501 shown in the example of FIG. 5 is a rule regarding "words" and indicates that the use of words "," is prohibited. The lexical information 405 shown in the example of FIG. 4 is the rule 50 shown in FIG.
1, the line message 601 consisting of the line number and message shown in the example of FIG. 6 is stored in the memory. Thereafter, the lexical information 405 shown in the example of FIG. 4 is deleted from the memory.

字句情報406も同様にメモリから削除する。Lexical information 406 is similarly deleted from memory.

1行について付置析が終了すると、次に第1図で示すス
テップ104で、メモリ内に記憶した字句情報にカラム
が「7」、字句が「*」があれば、該字句情報の作成光
となった行は注記(コメント)行と判断し、該符番を持
つ字句情報をメモリ内の記憶から削除し、第1図で示す
ステップ101に戻り、次の行を読み込む。注記行でな
い場合、メモリ内に記憶した字句情報をもとに言語構文
に基づいた文の情報を取り出し、文を形成する(ステッ
プ105)。
When the appendix analysis is completed for one line, in step 104 shown in FIG. 1, if the lexical information stored in the memory has a column of "7" and a lexical of "*", the lexical information creation light is The line marked with the number is determined to be a comment line, the lexical information having the number is deleted from the memory, and the process returns to step 101 shown in FIG. 1 to read the next line. If the line is not a note line, sentence information based on language syntax is extracted based on the lexical information stored in the memory, and a sentence is formed (step 105).

第7図は、第3図の例で示すソー、スプログラムを付置
析し、文形成した結果をメモリ内に記憶した例を示す。
FIG. 7 shows an example in which the source program shown in the example of FIG. 3 is additionally analyzed and the results of sentence formation are stored in memory.

第1図の例で示す文形成(ステップ105)は、付置析
(ステップ103)により得られた字句情報をC0BO
Lの言語構文に基づき構文解析することによって文の情
報を作成し、メモリ内に記憶する。
In the sentence formation (step 105) shown in the example of Figure 1, the lexical information obtained by the appendix analysis (step 103) is
Sentence information is created by parsing based on the L language syntax and stored in memory.

例えば、第4図の例で示す字句情報を(ただし、字句情
報405,406は削除されている)例えばC0BOL
の言語構文に基づいて構文解析することにより、第7図
の例で示す文情報701を形成する。各情報は、第4図
の例で示す字句rALTERJ  (401)がら文情
報を識別する項目rALTERJ  (702)を、符
番「82」(402)から開始行r82J  (703
)を、カラムr15J  (403)がら開始カラム「
15」(704)を、また、構文情報により字句rSW
J(407)、字句「Pl」 (4o8)からパラメ−
タrSW、PIJ  (705)をそれぞれ作成し、メ
モリ内に記憶する。項番r70J  (706)は文情
報を作成しメモリ内に記憶するたびに1つずつ上昇させ
る文情報を識別する番号である。また、親項目r52J
  (707)は、この文情報の例えばC0BOL構文
上での階層関係を示すときの上階層に当たる文情報の項
番をメモリ内に記憶し゛たものである。この文情報をメ
モリ内に記憶した後、該字句情報はメモリより削除する
。第7図の例で示す文情報701では、第4図の例で示
す字句情報群406をメモリより削除する。
For example, if the lexical information shown in the example of FIG. 4 (however, lexical information 405 and 406 are deleted) is
By performing syntax analysis based on the language syntax of , sentence information 701 shown in the example of FIG. 7 is formed. Each piece of information includes an item rALTERJ (702) that identifies sentence information from the lexical rALTERJ (401) shown in the example of FIG.
) from column r15J (403) to the starting column "
15'' (704), and also the lexical rSW by syntactic information.
J (407), parameter from the lexical “Pl” (4o8)
The data rSW and PIJ (705) are respectively created and stored in memory. Item number r70J (706) is a number for identifying sentence information that is incremented by one each time sentence information is created and stored in the memory. Also, parent item r52J
(707) stores in memory the item number of the sentence information corresponding to the upper layer when indicating the hierarchical relationship in the C0BOL syntax, for example. After storing this sentence information in memory, the lexical information is deleted from memory. In the sentence information 701 shown in the example of FIG. 7, the lexical information group 406 shown in the example of FIG. 4 is deleted from the memory.

第1図で示す文形成(ステップ1o5)で1つの文情報
が形成できた場合(ステップ106)、該文情報をもと
に文分析(ステップ1o7)を行なう。文形成(ステッ
プ105)によって未だ1つの文情報にならなかった場
合(1つの文が複数の行にまたがっている場合)(ステ
ップ106)ステップ101に戻り、次の行を読み込む
When one piece of sentence information can be formed in the sentence formation (step 1o5) shown in FIG. 1 (step 106), sentence analysis (step 1o7) is performed based on the sentence information. If the sentence formation (step 105) has not resulted in one sentence information (if one sentence spans multiple lines) (step 106), the process returns to step 101 and reads the next line.

文分析(ステップ1o7)では、文形成(ステップ1o
5)で作成した最新の文情報を対象として、標準化基準
規則のうち区分が「文」の規則を適用し、文のチエツク
を行ない、標準化基準規則に反する文の場合、文情報内
の「開始符番Jとメツセージをメモリ内に記憶する。
In sentence analysis (step 1o7), sentence formation (step 1o
Targeting the latest sentence information created in step 5), apply the standardization standard rules with the classification "sentence" and check the sentence. If the sentence violates the standardization standard rules, the "Start" Store the code number J and the message in memory.

例えば、第7図の例で示す文情報701を対象とした文
分析は、第5図の例で示す標準化基準規則のうち規則5
02を適用する。ここで、「適用」とは、文情報に対し
て、区分が「文」の規則のうちチエツクの対象となる規
則が見つかることを示す。規則502は、「文Jに関す
る規則で項名がrALTER」の文の使用を「禁止」す
ることを示している。この規則502により第7図の例
で示す文情報701は、使用「禁止」命令であることが
わかり、開始行「82」と共にメツセージをメモリ内に
記憶する)(第6図の行メツセージ602)、。
For example, sentence analysis targeting the sentence information 701 shown in the example of FIG.
Apply 02. Here, "apply" indicates that a rule to be checked is found among the rules classified as "sentence" for the sentence information. Rule 502 indicates that the use of the sentence "rule related to sentence J, item name is rALTER" is "prohibited". According to this rule 502, it is determined that the sentence information 701 shown in the example of FIG. 7 is a "prohibited" command, and the message is stored in the memory along with the starting line "82") (Line message 602 in FIG. 6) ,.

第1図で示す文分析(ステップ107)の終了後、文形
成(ステップ1o5)に戻り、メモリ内に記憶されてい
る字句情報をもとに1文が形成(ステップ105)でき
なくなるまで(ステップ106)、文分析(ステップ1
07)−文形成(ステップ105)を繰り返す。
After the sentence analysis (step 107) shown in FIG. 106), sentence analysis (step 1
07) - Repeat sentence formation (step 105).

例えば、第4図の例では、字句情報群409は、1度目
の文形成によりメモリより削除されており、2度目の文
形成時には、字句情報群410を対象として、文形成を
行ない、第7図の例で示す文情報708を作成する。文
情報708における文分析では、第5図で示す規則50
3を適用し、第7図の文情報708内の開始行「82」
と1つ前の文情報701内の開始行「82」の値が同一
であることから、第6図で示す行メツセージ603をメ
モリ内に記憶する。また、第7図の例で示す文情報70
9における文分析では、第5図で示す前述の規則503
に加え、規則504が適用できる。
For example, in the example shown in FIG. 4, the lexical information group 409 is deleted from the memory during the first sentence formation, and when forming the second sentence, the lexical information group 410 is used as the target for sentence formation, and the lexical information group 409 is Text information 708 shown in the example shown in the figure is created. In the sentence analysis in the sentence information 708, the rule 50 shown in FIG.
3 is applied, and the start line "82" in the sentence information 708 in FIG.
Since the values of the start line "82" in the previous sentence information 701 are the same, the line message 603 shown in FIG. 6 is stored in the memory. In addition, the sentence information 70 shown in the example of FIG.
In the sentence analysis in 9, the above-mentioned rule 503 shown in FIG.
In addition, rule 504 is applicable.

規則504はr文Jに関する規則で、前出の文情報より
ネストレベルが深い場合、「字さげ」記述を行なうこと
を示している。例えば、第7図の例で示す文情報709
の親項番「87」は、前出の文情報710の親項番「8
2」より値が大きいことから、ネストレベルが深いこと
がわかる。ネストレベルが深くなった場合、前出の文の
開始カラム位置より値が大きい開始カラム位置を有する
ことが、前述の「字さげ」を示す規則の意図である。
Rule 504 is a rule regarding r-sentence J, and indicates that if the nesting level is deeper than the previous sentence information, "indentation" description is to be performed. For example, the sentence information 709 shown in the example of FIG.
The parent item number "87" is the parent item number "87" of the sentence information 710 mentioned above.
Since the value is larger than "2", it can be seen that the nesting level is deep. It is the intent of the above-mentioned "indentation" rule to have a starting column position that is larger in value than the starting column position of the previous sentence when the nesting level becomes deep.

従って、文情報709の開始カラム「15」は文情報7
01の開始カラム「15」より大きくなければならない
が、規則に反しているため第6図で示す行メツセージ6
04をメモリ内に記憶する。
Therefore, the start column "15" of the sentence information 709 is the sentence information 7
It must be larger than the starting column "15" of 01, but since it is against the rules, line message 6 shown in Figure 6
04 in memory.

逆に、前出の文情報よりネストレベルが浅い場合、1字
さげ」記述とは、1字さげ戻りJを意味し、前出の文の
開始カラム値より該文の開始カラム値が小さいことを示
す。例えば、第7図の例では文情報711の親項番「8
2」は、前出の文情報712の親項番「89」より値が
小さいことがらネストレベルが浅くなっていることがわ
かる。このことから、文情報711の開始カラムr17
Jは文情報712の開始カラム「17」より小さくなけ
ればならないが、規則に反しているため、第6図で示す
行メツセージ605をメモリ内に記憶する。
On the other hand, if the nesting level is shallower than the previous sentence information, the "one character down" description means one character back J, and the start column value of the sentence is smaller than the start column value of the previous sentence. shows. For example, in the example shown in FIG.
2" has a smaller value than the parent item number "89" of the sentence information 712, which indicates that the nesting level is shallower. From this, starting column r17 of sentence information 711
J must be smaller than the starting column "17" of sentence information 712, but since this is against the rule, line message 605 shown in FIG. 6 is stored in memory.

次に、ソースプログラムの読み込み(第1図で示すステ
ップ101)が終了した場合(ステップ102)、メモ
リ内に記憶した文形成結果をもとにプログラム全体の分
析を行なう(ステップ108)。
Next, when the reading of the source program (step 101 shown in FIG. 1) is completed (step 102), the entire program is analyzed based on the sentence formation results stored in the memory (step 108).

全体分析(ステップ108)では、文形成(ステップ1
05)で作成し、メモリ内に記憶した全ての文情報を対
象として、標準化基準規則のうち区分が「全体」の規則
を適用し、プログラム全体のチエツクを行ない、標準化
基準規則に反する文について、この文の符番と合わせて
メツセージをメモリ内に記憶する。
In the overall analysis (step 108), sentence formation (step 1
05) and stored in memory, apply the standardization standard rules whose category is "whole", check the entire program, and check for sentences that violate the standardization standard rules. The message is stored in memory along with the code number of this sentence.

例えば、第5図の例で示す標準化基準規則で規則505
は、「全体」に関する規則で、項名がrGOTOJの文
情報の、パラメータで示す内容のうち少なくとも1つが
この文情報より小さい項番を持つ項名「手続き節」ある
いは、「手続き段落」のパラメータで示す内容と一致す
ることを禁止することを示している。規則505の適用
により、第7図の例で示す文情報のうち、まず、項名が
rGOT○」の文情報を検出する。文情報713が該当
するが、パラメータに値を持たないため、次の項名がr
GOTOJの文情報を検出する。文情報714が該当し
、パラメータ「Pl」を得る。
For example, in the standardization standard rule shown in the example in Figure 5, rule 505
is a rule regarding "whole", and at least one of the contents indicated by the parameters of the sentence information with the item name rGOTOJ has a smaller item number than this sentence information. Indicates that matching with the content shown in is prohibited. By applying the rule 505, first, among the sentence information shown in the example of FIG. 7, sentence information with the item name "rGOT○" is detected. Statement information 713 is applicable, but the parameter does not have a value, so the next item name is r.
Detect the sentence information of GOTOJ. The sentence information 714 is applicable, and the parameter "Pl" is obtained.

次に、パラメータに「Pl」を持つ項名「手続き節」あ
るいは、「手続き段落」の文情報を検出する。文情報7
15が該当し、項番「82」は、文情報714の項番「
86」より小さいことがら。
Next, sentence information with a section name "procedure section" or "procedure paragraph" having "Pl" as a parameter is detected. Sentence information 7
15 is applicable, and the item number “82” is the item number “82” of the sentence information 714.
Items smaller than ``86''.

文情報714は規則に反する文情報であることがわかり
、符番「95」と共にメツセージをメモリ内に記憶する
(第6図の例で示す行メツセージ606)。また、第5
図の例で示す標準化基準で規則506は、「全体」に関
する規則で、項名がrIFJ 、rTHENJ 、rE
LsEJ 。
The sentence information 714 is found to be against the rules, and the message is stored in the memory along with the number "95" (line message 606 shown in the example of FIG. 6). Also, the fifth
Rule 506 in the standardization standard shown in the example in the figure is a rule regarding "whole", and the term names are rIFJ, rTHENJ, rE
LsEJ.

rENDIFJの文情報が、この順に項番が大きくなり
、各文情報の親項番が同じであるという構造を持つこと
を示している。この規則506の適用により、第7図の
例で示す文情報のうち、まず、項名がrIFJの文情報
を検出する。文情報716が該当する。次にこの文情報
716の親項番「82」と同じ親項番を持ち、項番「8
5」より大きい項番を持つ文情報を検出する。第7図の
例では文情報710が該当するが、項名はrE L S
 EJで、規則で示すrTHENJでないため、規則に
反する構造であることがわかり、この規則の適用で初め
に検出した文情報716の符番「95」とメツセージを
メモリ内に記憶する(第6図の行メツセージ607)。
This shows that the sentence information of rENDIFJ has a structure in which the item numbers increase in this order and the parent item numbers of each piece of sentence information are the same. By applying this rule 506, first, among the sentence information shown in the example of FIG. 7, sentence information with the item name rIFJ is detected. Sentence information 716 corresponds to this. Next, it has the same parent item number as the parent item number “82” of this sentence information 716, and has the item number “82”.
Sentence information having an item number greater than "5" is detected. In the example of FIG. 7, sentence information 710 corresponds, but the item name is rE L S
In EJ, since it is not rTHENJ as specified in the rule, it is found that the structure is contrary to the rule, and by applying this rule, the code number "95" of the sentence information 716 detected first and the message are stored in the memory (Fig. 6 line message 607).

第5図の例で示す標準化基準で規則507は、「全体」
に関する規則で、項名が「手続き節」の文情報から、こ
の文情報の項番より大きい項番を持ち、項名が「手続き
節」の文情報の直前までの行数が「30」以下であるよ
う制限することを示している。この規則507の適用に
より、第7図の例で示す文情報のうち、まず、項名が「
手続き節」の文情報を検出する。文情報717がそれに
該当する。続いて、文情報717の項番「51」より大
きい項番を持つ項名が「手続き節」の文情報のうち項番
が最少の文情報を検出する。文情報718がそれに該当
する。文情報718の開始行「166」から前出の文情
報717の開始行「61」を引いた数値rlO5Jが、
文情報717の「手続き節」に属する行数であることが
わかり、第5図で示す規則507の行数「30」より大
きいことから、規則に反しているため第6図で示す行メ
ツセージ608をメモリ内に記憶する。
In the standardization standard shown in the example in Figure 5, rule 507 is "overall"
rules, the number of lines from the statement information whose section name is "Procedure Section" to the section immediately before the statement information whose section name is "Procedure Section" and whose section number is greater than the section number of this statement information is "30" or less. This indicates that the limit is set to . By applying this rule 507, in the sentence information shown in the example of FIG.
Detects sentence information of "procedure clause". Sentence information 717 corresponds to this. Next, the sentence information having the smallest item number is detected from among the sentence information 717 whose item name is ``procedure clause'' and has an item number greater than ``51''. Sentence information 718 corresponds to this. The numerical value rlO5J is obtained by subtracting the start line “61” of the sentence information 717 from the start line “166” of the sentence information 718.
It is found that the number of lines belongs to the "procedure clause" of the sentence information 717, and it is larger than the number of lines "30" in the rule 507 shown in FIG. 5, so the line message 608 shown in FIG. 6 is against the rule. is stored in memory.

次に、第1図のステップ109の各種数値測定を行なう
Next, various numerical measurements in step 109 in FIG. 1 are performed.

第8図は、プログラム全体についての各種数値情報収集
結果をメモリ内に記憶した例を示す。
FIG. 8 shows an example in which various numerical information collection results regarding the entire program are stored in the memory.

第8図で示す数値名「行数」の値「480」は、第1図
で示す付置析(ステップ103)において、順次計数し
ている「符番」をメモリ内に記憶したもの、数値名「文
数」の値r31oJは、第1図で示す文分析(ステップ
105)において、順次計数している「項番」をメモリ
内に記憶したもの、数値名「コメント数」の値E35」
は、第1図で示すコメント判断(ステップ104)にお
いて、順次計数している値をメモリ内に記憶したもの、
数値名rGOTO数」の値「11」は、メモリ内に記憶
した文形成結果の文情報のうち、項名がrGOT○」の
文情報について計数した値をメモリ内に記憶したもの、
数値名「手続き筒内平均行数」の値「40」及び、「手
続き肺内最大行数」の値「52」は、第1図で示す全体
分析(ステップ108)で適用した第5図の例で示す規
則507と同様の方法によって「手続き節」に属する行
数の各「手続き節」について算出し、その平均値、最大
値を算出、及び取り出しメモリ内に記憶したもの、数値
名「手続き肺内平均文数」の値「38」及び、「手続き
節内最人文数」の値「49」は、第1図で示す全体分析
(ステップ108)で適用した第5図の例で示す規則5
07と同様の方法であるが、計算対象を1項番」にする
ことによって「手続き節」に属する文数を各「手続き節
」について算出し、その平均値、最大値を算出、及び取
り出しメモリ内に記憶したもの、数値名「禁止命令不良
数」の値「22」は、第6図で示す行メツセージが「禁
止命令「−」が使用されている」を持つ行メツセージの
数を計数した値をメモリ内に記憶したもの、数値名[同
−行数制不良数」の値「8」は、第6図で示す行メツセ
ージが「同一行に複数の文が使用されている」を持つ行
メツセージの数を計数した値をメモリ内に記憶したもの
、数値名「不用字句使用行数」の値「5」は、第6図で
示す行メツセージが「「−」が使用されている」を持つ
行メツセージのうち異なる符番の数を計数した値をメモ
リ内に記憶したもの、数値名r字さげ不良数」の値「5
1」は、第6図で示す行メツセージが「字さげがされて
いない」あるいは、「字さげ戻りがされていない」を持
つ行メツセージの数を計数した値をメモリ内に記憶した
もの、数値名「構造化不良数」の値「32」は、第6図
で示す行メツセージが[構造化されていない」を持つ行
メツセージの数を計数した値をメモリ内に記憶したもの
、数値名「行数制限不良数」の値「3」は、第6図で示
す行メツセージが「行数が「−」行で制限値を超えてい
る」を持つ行メツセージの数を計数した値をメモリ内に
記憶したものである。
The value "480" for the numerical name "number of rows" shown in Figure 8 is the value stored in memory of the "number" that is counted sequentially in the additional analysis (step 103) shown in Figure 1, and the numerical name The value r31oJ of ``number of sentences'' is the ``item number'' that is sequentially counted in the sentence analysis (step 105) shown in FIG. 1, stored in memory, and the value E35 of the numerical name ``number of comments.''
is a memory that stores the values sequentially counted in the comment judgment (step 104) shown in FIG.
The value "11" of the numerical name "rGOTO number" is the value counted in the memory for the sentence information with the item name "rGOT○" among the sentence information of the sentence formation results stored in the memory,
The value "40" of the numerical name "average number of lines in the procedure cylinder" and the value "52" of the "maximum number of lines in the procedure lung" are based on the values in Figure 5 applied in the overall analysis (step 108) shown in Figure 1. The number of rows belonging to the "procedure clause" is calculated for each "procedure clause" using the same method as rule 507 shown in the example, and the average value and maximum value are calculated, and the value stored in the memory and the numerical name "procedure clause" are calculated. The value "38" for "average number of sentences in lungs" and the value "49" for "maximum number of human sentences in procedure clause" are based on the rules shown in the example in Figure 5 that were applied in the overall analysis (step 108) shown in Figure 1. 5
The method is similar to 07, but by setting the calculation target to 1 item number, the number of sentences belonging to the "procedure clause" is calculated for each "procedure clause", and the average value and maximum value are calculated, and the retrieval memory is The value ``22'' of the numerical name ``number of defective prohibition commands'' stored in the memory is calculated by counting the number of line messages in which the line message shown in Figure 6 has ``the prohibition command ``-'' is used.'' If the value is stored in memory, the value ``8'' with the numerical name [same line number system defective number] has the line message shown in Figure 6 ``Multiple sentences are used on the same line.'' The value of the counted number of line messages is stored in memory, and the value ``5'' of the numerical name ``Number of lines using unnecessary words'' indicates that the line message shown in Figure 6 is ``-'' is used.'' The value of the number of different code numbers among the line messages with the ``numeric name r'' value ``5'' is stored in memory.
1" is the value stored in memory, which is the count of the number of line messages in which the line message shown in Figure 6 has "no indentation" or "no indentation." The value "32" for the name "Number of structured defects" is the value stored in memory by counting the number of row messages whose row messages have "unstructured" as shown in Figure 6. The value ``3'' of the line number limit defective number is the value obtained by counting the number of line messages in which the line message shown in Figure 6 has ``the number of lines exceeds the limit value for ``-''lines.'' This is what I remembered.

次に、第1図で示す分析結果の出力(ステップ110)
は、ソースプログラムの各行と、対応する行メツセージ
を対にして出力装置に出力する。
Next, output the analysis results shown in FIG. 1 (step 110)
outputs each line of the source program and the corresponding line message as a pair to the output device.

第9図は、第3図の例で示すソースプログラムの分析結
果を出力装置に出力した例を示す。
FIG. 9 shows an example in which the analysis results of the source program shown in the example of FIG. 3 are output to an output device.

例えば、第3図の例で示すソースプログラムは、第1図
のプログラム入力(ステップ101)において、メモリ
内に入力した行を単位に記憶しており、出力装置に先頭
の行より順次符番と同時に出力する。その際、第6図の
例で示す行メツセージ中に出力する行と同じ符番を持つ
行メッセージカ1ある場合、メツセージを付加して出力
する。第3−の例で示す行301は、第9図で示す行9
01に項番r82J  (902)と同時に出力し、第
6図の例で示す項番「82」を持つ行メツセージ群(6
09)を同時に出力する(903)。
For example, the source program shown in the example of FIG. 3 stores the input lines in the memory in units of units in the program input (step 101) of FIG. Output at the same time. At this time, if there is a line message with the same number as the line to be output in the line message shown in the example of FIG. 6, the message is added and output. The row 301 shown in the example 3- is the row 9 shown in FIG.
The line message group (6
09) are simultaneously output (903).

ソースプログラムの終了により分析結果の出力を終了す
ると、続いて第1図で示す分析結果の評価を評価基準規
則に従って行ない(ステップ111)、評価結果を出力
装置に出力しくステップ112)、プログラムの評価を
終了する。
When the output of the analysis results is finished due to the termination of the source program, the analysis results shown in FIG. end.

第10図は、評価基準規則の例、第11図、第12図は
、評価結果を出力装置に出力した例を示す。第1o図で
示す評価基準規則Aは、第8図の例で示す各種数値情報
収集結果をもとに各種評価点を求めるための規則であり
、例えば1項目名[行数j  (1001)は、評価項
目の種類を示し、条件1002が正しい場合、評価点r
5J (1003)を求めることを示す。条件1002
では、第8図で示す数値名「行数」の数値r480Jが
r300Jより大きいため、次に続く項目「行数」の条
件1004のチエツクを行なう。第8図で示す数値名「
行数」の数値r480Jがr500Jより小さいため、
該条件は正しいと判断し、評価点「4」(1005)を
求めメモリ内に記憶する。同様に各種項目名ごとに条件
をチエツクし、評価点をそれぞれ求めメモリ内に記憶す
る。求めた評価点は順次加算し、「総合点」としてメモ
リ内に記憶する。メモリ内に記憶した各「評価点」及び
「総合点」は、項目名と共に第8図の例で示す各種数値
情報収集結果の各数値と対応させて第11図で示す評価
結果の出力(ステップ112)において順次編集して出
力する(第11図)。また、第10図で示す評価基準規
則Bは、第8図の例で示す各種数値情報収集結果をもと
に、各種標準化率を求めるための規則で量り、例えば、
項目名[形の見やすさJ  (1006)は、式100
7を計算することにより百分率で値を算出することがで
きる。
FIG. 10 shows an example of evaluation standard rules, and FIGS. 11 and 12 show examples in which evaluation results are output to an output device. Evaluation standard rule A shown in FIG. 1o is a rule for obtaining various evaluation points based on the various numerical information collection results shown in the example of FIG. , indicates the type of evaluation item, and if the condition 1002 is correct, the evaluation point r
5J (1003) is calculated. Condition 1002
Now, since the numerical value r480J of the numerical name "number of lines" shown in FIG. 8 is greater than r300J, the condition 1004 of the next item "number of lines" is checked. Numerical name shown in Figure 8 “
Because the number r480J of "Number of rows" is smaller than r500J,
It is determined that the condition is correct, and an evaluation score of "4" (1005) is obtained and stored in the memory. Similarly, conditions are checked for each item name, and evaluation points are obtained and stored in the memory. The obtained evaluation points are added up sequentially and stored in the memory as a "total score." Each "evaluation score" and "overall score" stored in the memory are associated with each numerical value of the various numerical information collection results shown in the example of FIG. 8 together with the item name, and the evaluation results are output (step 112), the data is sequentially edited and output (FIG. 11). Furthermore, the evaluation standard rule B shown in FIG. 10 is based on the various numerical information collection results shown in the example of FIG.
Item name [Easy to see shape J (1006) is formula 100
By calculating 7, the value can be calculated as a percentage.

式1007の「同−行複数文不良数」、「不用字句使用
行数」、「字さげ不良数」、「行数」は、第8図の例で
示す数値名「同−行複数文不良数」の値「8」、「不用
字句使用行数」の値「5」、「字さげ不良数」の値「5
1」、「行数」の値r480J を示し、式はrx−(
8+5+51)/480Jとなり計算結果のro、86
7Jをr形の見やすさ」としてメモリ内に記憶する。同
様に各種項目毎に式を計算することにより、各種標準化
率を算出し、メモリ内に記憶する。メモリ内に記憶した
各種標準化率は、項目名と共に第11図に示すごとく例
えば、レーダチャート形式で出力装置に出力する(ステ
ップ112)。
"Number of defective sentences in the same line", "Number of lines using unnecessary words", "Number of defective indentations", and "Number of lines" in formula 1007 are replaced by the numerical name "Number of defective sentences in the same line" shown in the example in Figure 8. ``Number'' value ``8'', ``Number of unnecessary lines used'' value ``5'', ``Number of defective font indentations'' value ``5''.
1", the value of "number of rows" is r480J, and the formula is rx-(
8+5+51)/480J, and the calculation result is ro, 86
7J is stored in memory as "R-shaped visibility". Similarly, by calculating formulas for each item, various standardization rates are calculated and stored in the memory. The various standardization rates stored in the memory are output to the output device in the form of a radar chart, for example, as shown in FIG. 11, together with the item names (step 112).

本実施例によれば、ソースプログラムを標準のコーディ
ング基準に対し、どの程度守られているかがわかり、従
って、保守のしやすさについて、使用者が公平、的確な
判断をすることができる効果がある。
According to this embodiment, it is possible to see to what extent the source program adheres to the standard coding standards, and therefore the user can make fair and accurate judgments regarding ease of maintenance. be.

第13図に、本発明の第2の実施例における処理手順を
示す。本実施例は、第1図に示した実施例に加えて、標
準化基準規則、及び評価基準規則を外部記憶装置より入
力するようにしたものである。
FIG. 13 shows the processing procedure in the second embodiment of the present invention. In this embodiment, in addition to the embodiment shown in FIG. 1, standardization standard rules and evaluation standard rules are input from an external storage device.

第13図の例で示す規則入力(ステップ1301)のス
テップ以外は、第1図で示した実施例と同じである。
The steps other than the rule input step (step 1301) shown in the example of FIG. 13 are the same as the embodiment shown in FIG.

規則入力(ステップ1301)は、外部記憶装置に蓄積
されている付置析(ステップ1o3)、文分析(ステッ
プ107)、及び全体分析(ステップ1o8)ず使用す
る標準化基準規則(第5図に例を示す)と、分析結果の
評価(ステップ111)で使用する評価基準規則(第1
0図に例を示す)を入力し、メモリ内に記憶する。
Rule input (step 1301) includes standardization standard rules to be used (an example is shown in Figure 5) for additional analysis (step 1o3), sentence analysis (step 107), and overall analysis (step 1o8) stored in the external storage device. ) and the evaluation criteria rules (first
(Example shown in Figure 0) and store it in memory.

本実施例によれば、標準化基準あるいは評価基準を、ソ
フトウェア開発プロジェクト、部署、事業所等に適した
基準に、外部記憶装置内に蓄積されている標準化基準規
則、評価基準規則を、予め設定しておくことにより変更
ができ、標準化基準あるいは評価基準の異なる場合にも
汎用に利用できる効果がある。
According to this embodiment, the standardization standards or evaluation standards stored in the external storage device are set in advance to standards suitable for software development projects, departments, offices, etc. By keeping it in place, changes can be made, and it has the effect of being universally usable even when standardization standards or evaluation standards are different.

第14図に本発明のソフトウェア評価方法の第3の実施
例の処理手順を示す。本実施例は、第1図に示した実施
例に加えて、入力されたプログラムが標準パターンを利
用して作成したプログラムである場合、標準パターンに
対してオウンコーディングをした部分のみに対し保守性
を評価することを可能にしたものである。ここで標準パ
ターンとは、プログラムの処理手順の主要な部分を作成
した標準的な半完成プログラムであり、利用者は、個別
部分について標準パターンに追加してコーディングを行
なう(以下オウンコーディングと呼ぶ)ことにより、標
準的なプログラムを作成することができる。第15図は
標準パターンを利用して作成したC0BOL言語で記述
されたソースプログラムの例、第16図は標準パターン
に対しその中のオウンコーディング部やパターン部を識
別するためのコメントを記載したテーブルの例、第17
図は標準パターン部分とオウンコーディング部を識別し
て各部分の開始符番を記憶してテーブルの例、第18図
はオウンコーディング部についての保守性の評価結果を
出力した例を示す。第14図の処理手順において入力さ
れたプログラムの1行をコメントと判断した場合(ステ
ップ1o4)、該コメントがパターンよりを含んでいる
がどうかを判定する。例えば第15図の2101のコメ
ントのようにrPATTERN−I D : PATT
ERNIJで始まっている場合、該プログラムが標準パ
ターンを含み、rPATTERNIJ ヲパターンTD
と判断L (Xテ’/プ2001)、パターンよりに対
応するパターン情報の入力(ステップ2002)を行な
う。パターン情報の入力(ステップ2002)は、外部
記憶装置にパターンよりを識別子として蓄積しているパ
ターン情報のうち、抽出したパターンよりがら識別され
るパターン情報を、メモリ内に入力して記憶する(ステ
ップ2002)。第16図はメモリ内に記憶したパター
ン情報の例を示し、コメント行21o1内のパターンI
Dで識別される標準パターンrPATTERNIJ  
(2201) (7)パターン情報を示す。該パターン
情報は、該プログラム中のコメント行内のコメントが、
記憶している内容、例えば「*G メイン ショリJ 
 (2202)で始まっている場合、ソースプログラム
の以下の行は「パターンJ  (2203)の行であり
、標準パターン中に予めコーディングされている部分で
あることを示す。またコメントが例えば「*G カイシ
 ショリJ  (2204)で始まっている場合は、ソ
ースプログラムの以下の行は「オウンコーディングJ 
 (2205)の行であり標準パターンの中にユーザー
が追加コーディングした部分であることを示す。コメン
トにパターンIDが含まれていなければ識別判定ステッ
プ2003において、前にパターン情報入力ステップ2
0o2で得たパターン情報から該コメント行がオウンコ
ーディングの開始行かパターンの開始行かあるいはそれ
以外かを識別する。オウンコーディングの開始行ならオ
ウンコーディング開始情報記憶ステップ2004で該行
の符番をオウンコーディング開始情報として、パターン
の開始行ならパターン開始情報記憶ステップ2005で
該行をパターン開始情報として、第17図に示されるオ
ウンコーディング及びパターンの開始行を表したテーブ
ルに記憶し、プログラム入力ステップ101に戻りプロ
グラムの次の一行を読み込む。プログラムのすべての行
が入力され、第1図の実施例と同様に全体分析ステップ
108を実行した後、オウンコーディング範囲決定ステ
ップ2006でオウンコーディングの範囲を、オウンコ
ーディング開始情報記憶ステップ2004で得られたオ
ウンコーディング開始符番の情報とパターン開始情報記
憶ステップ2005で得られたパターン開始付番の情報
から得る。これを基にオウンコーディング範囲内数値測
定ステップ2008でオウンコーディング部分を分析し
、オウンコーディング分析結果出カステップ2009で
第9図と同様な、オウンコーディング部のメツセージ付
きプログラムソースリストを出力する。更にオウンコー
ディング部分析結果評価ステップ2010でコーディン
グ基準に従って測定されたオウンコーディング部を評価
し、オウンコーディング部評価結果出カステップ2o1
1で第18図に示されるオウンコーディング部評価結果
リストを得る。
FIG. 14 shows the processing procedure of the third embodiment of the software evaluation method of the present invention. In addition to the embodiment shown in FIG. 1, this embodiment provides maintainability only for the part of the standard pattern that is own-coded when the input program is a program created using a standard pattern. This made it possible to evaluate the Here, the standard pattern is a standard semi-completed program that has created the main parts of the program's processing procedure, and the user codes individual parts by adding them to the standard pattern (hereinafter referred to as own coding). This allows you to create standard programs. Figure 15 is an example of a source program written in C0BOL language created using standard patterns, and Figure 16 is a table that describes comments for identifying own coding parts and pattern parts for standard patterns. Example, 17th
The figure shows an example of a table in which the standard pattern part and the own coding part are identified and the starting numbers of each part are stored, and FIG. 18 shows an example of outputting the maintainability evaluation results for the own coding part. When one line of the input program is determined to be a comment in the processing procedure of FIG. 14 (step 1o4), it is determined whether the comment includes a pattern. For example, as in the comment 2101 in Fig. 15, rPATTERN-ID: PATT
If the program starts with ERNIJ, then the program contains a standard pattern and rPATTERNIJ wo pattern TD.
After judgment L (step 2001), pattern information corresponding to the pattern is input (step 2002). Inputting pattern information (step 2002) involves inputting and storing pattern information identified by the extracted pattern among the pattern information stored in the external storage device using the pattern as an identifier into the memory (step 2002). 2002). FIG. 16 shows an example of pattern information stored in the memory, and shows the pattern I in the comment line 21o1.
Standard pattern rPATTERNIJ identified by D
(2201) (7) Indicates pattern information. The pattern information indicates that the comment in the comment line in the program is
What you remember, for example, ``*G Main Shori J
(2202), the following line of the source program is a line of "Pattern J (2203)", indicating that it is a part coded in advance in the standard pattern. Also, if the comment is, for example, "*G If the source program starts with ``Own Coding J'' (2204), the following lines of the source program are ``Own Coding J''.
This line (2205) indicates that the user has added additional coding to the standard pattern. If the comment does not include a pattern ID, in identification determination step 2003, pattern information input step 2 is
From the pattern information obtained in 0o2, it is determined whether the comment line is the start line of own coding, the start line of a pattern, or something else. If it is an own coding start line, the code number of the line is used as own coding start information in the own coding start information storage step 2004, and if it is a pattern start line, the line is used as pattern start information in the pattern start information storage step 2005. The indicated own coding and the starting line of the pattern are stored in a table, and the process returns to the program input step 101 to read the next line of the program. After all lines of the program have been input and the overall analysis step 108 has been performed in the same manner as in the embodiment of FIG. It is obtained from the own coding start number information obtained in the pattern start information storage step 2005 and the pattern start number assignment information obtained in the pattern start information storage step 2005. Based on this, the own coding part is analyzed in the own coding range measurement step 2008, and the own coding analysis result output step 2009 outputs a program source list with messages for the own coding part, similar to that shown in FIG. Further, in own coding part analysis result evaluation step 2010, the own coding part measured according to the coding standard is evaluated, and the own coding part evaluation result is output step 2o1.
1, the own coding unit evaluation result list shown in FIG. 18 is obtained.

例えば第15図のソースプログラムが本システムに入力
された場合、2行目のr * PATTERN −I 
D PATTERNl」(2101)をパターンID判
定ステップ2o01でパターンIDと認識し、第16図
に示されるパターンPATTERNIに関する情報をパ
ターン情報入力部2002で得る。第15図88行目の
「寧G カイシ ショリ」が入力されると区別判定ステ
ップ2003で第16図2204゜2205に示される
情報からオウンコーディング開始行と判断し、オウンコ
ーディング開始情報記憶ステップ2004で第17図の
テーブルの番号2の欄に88が○(オウンコーディング
)の開始行であることを記憶する。オウンコーディング
範囲作成部2006では該テーブルより第15図の88
行から92行(次の番号の開始付番の一つ前の行)まで
を一つのオウンコーディングの範囲とし、以下同様に他
のオウンコーディングの範囲を算出する。オウンコーデ
ィング範囲内数値測定ステップ2008は行ステップ1
03や全体分析ステップ108で得られる行メツセージ
情報のうちこの範囲内のものを取りだし、この範名内に
ついて各種数値測定を第1図と同様に行う。オウンコー
ディング部分析結果の出力ステップ2009は対象ソー
スプログラムに対応して2008で抽出されたオウンコ
ーディングの行メツセージ情報を第9図と同様の形式で
出力する。オウンコーディング分析結果の評価ステップ
2010は第1図110と同様にオウンコーディング部
の評価を行ない、オウンコーディング部評価結果の出力
ステップ2011は第1図112と同様にオウンコーデ
ィング部の評価結果を出力する。第18図にその出力例
を示す。
For example, when the source program shown in Figure 15 is input to this system, r * PATTERN -I on the second line
D PATTERNl'' (2101) is recognized as a pattern ID in the pattern ID determination step 2o01, and information regarding the pattern PATTERNI shown in FIG. 16 is obtained in the pattern information input unit 2002. When "Ning G Kaishi Shori" on the 88th line of FIG. It is stored in the number 2 column of the table in FIG. 17 that 88 is the start line of ○ (own coding). The own coding range creation unit 2006 uses 88 in FIG. 15 from the table.
The range from line 92 to line 92 (the line immediately before the starting numbering of the next number) is defined as one own-coding range, and the other own-coding ranges are calculated in the same manner. Own coding range numerical value measurement step 2008 is row step 1
03 and the line message information obtained in the overall analysis step 108, those within this range are extracted, and various numerical measurements within this range are performed in the same manner as in FIG. The step 2009 for outputting the own coding part analysis results outputs the own coding line message information extracted in 2008 corresponding to the target source program in a format similar to that shown in FIG. The own coding analysis result evaluation step 2010 evaluates the own coding part in the same way as 110 in FIG. 1, and the own coding part evaluation result output step 2011 outputs the evaluation result of the own coding part in the same way as in FIG. . FIG. 18 shows an example of the output.

本実施例によれば標準パターンや部品を利用したプログ
ラムの保守性を効率的に評価できる。
According to this embodiment, the maintainability of a program using standard patterns and parts can be efficiently evaluated.

第19図に本発明のソフトウェア評価方法の第4の実施
例の処理手順を示す。第20図のソースプログラムはブ
ロックごとにオウンコーディング(0)かパターン(P
)かを識別子がコメントについており、これにより第1
9図の処理手順によって、第3の実施例における第16
図に示されるパターン情報なしにパターン部分やオウン
コーディング部分を識別することができる。
FIG. 19 shows the processing procedure of the fourth embodiment of the software evaluation method of the present invention. The source program in Figure 20 is either own coding (0) or pattern (P) for each block.
) or the identifier is attached to the comment, which makes the first
By the processing procedure shown in FIG. 9, the 16th
Pattern portions and own-coding portions can be identified without the pattern information shown in the figure.

例えば第20図のソースプログラムを入力した場合、2
行目のr r * PATTERN −I D PAT
TERN2JがパターンID識別ステップ2001でパ
ターンIDと認識され、パターンID記憶ステップ25
01で入力されたプログラムがrPATTERN2Jの
パターンを使用していることを記憶する。第20図88
行目の「串○ カイシ ショリ」が入力されると識別子
判定ステップ2502で先頭の「傘○」によりオウンコ
ーディングの開始行情報と判断し、オウンコーディング
開始情報記憶部2004で第17図のテーブルの番号2
の欄の符番に88行が○(オウンコーディング)の開始
行であることを記憶する。以下、第3の実施例と同様に
して第18図に示されるオウンコーディング部の評価結
果リストが生成される。以下は第3の実施例と同様であ
る。この実施例ではプログラム内にパターンの他の部品
(後述)を含む場合も同様にパターン部2部品、オウン
コーディング部を区別してプログラムの分析評価を行ま
うことができる。
For example, if you input the source program shown in Figure 20, 2
Row r r * PATTERN - ID PAT
TERN2J is recognized as a pattern ID in pattern ID identification step 2001, and pattern ID storage step 25
It is remembered that the program input in step 01 uses the pattern rPATTERN2J. Figure 20 88
When the line "Kushi○ Kaishi Shori" is input, the identifier determination step 2502 determines that it is own coding start line information based on the leading "umbrella○", and the own coding start information storage unit 2004 stores the information in the table shown in FIG. number 2
The number in the column indicates that line 88 is the start line of ○ (own coding). Thereafter, the evaluation result list of the own coding unit shown in FIG. 18 is generated in the same manner as in the third embodiment. The following is the same as the third embodiment. In this embodiment, even when the program includes other parts of the pattern (described later), the program can be analyzed and evaluated by distinguishing between the two parts of the pattern part and the own coding part.

第21図は本発明のソフトウェア評価方法の第5の実施
例の処理手順であり、部品を含むプログラムを入力し、
部品の使用率をオウンコーディング部などの評価ととも
に出力するものである。ここで部品とはあらかじめ機能
別に作成した標準の内部モジュールであり、新規開発の
ソフトウェアの一部に部品を用いることにより、開発工
程を削減することができる。第22図に本実施例におい
て入力されるC0BOLのソースプログラムの例を示す
。第23図にオウンコーディング部と、パターンまたは
部品の開始付番を表わしたテーブルを示す。第24図は
部品情報のテーブルで部品の名称とステップ数が組合せ
になって登録されている。第25図は本実施例で出力さ
れる出力リストであり、入力されたプログラムに含まれ
ていた部品について分析した結果を示す。
FIG. 21 shows the processing procedure of the fifth embodiment of the software evaluation method of the present invention, in which a program including parts is input,
It outputs the usage rate of parts along with the evaluation of the own coding section, etc. Here, a component is a standard internal module created in advance for each function, and by using the component as part of newly developed software, the development process can be reduced. FIG. 22 shows an example of a C0BOL source program input in this embodiment. FIG. 23 shows an own coding section and a table showing the start numbering of patterns or parts. FIG. 24 is a parts information table in which a combination of part name and step number is registered. FIG. 25 is an output list output in this embodiment, and shows the results of analyzing the parts included in the input program.

第21図の処理手順においてプログラム入力部101か
らパターンID識別部2001までは第14図の実施例
と同様であるが、ステップ2701で識別子があると判
断されたコメント行は識別子判定ステップ2702でオ
ウンコーディング開始かパターン開始か部品開始かを識
別し、部品開始と識別された場合は部品情報入力ステッ
プ2704で第24図に示される既に登録しである部品
の情報を入力する。更に27Q5で部品開始符番を第2
3図のテーブルに記憶する。こうしてステップ27o4
で得られた部品情報により第25図に示される部品の利
用率などを表わしたリストが分析結果評価ステップ27
08から出力される。例えば第22図に示されるC0B
OLのソースプログラムの109行は識別子判定ステッ
プ2701によって識別子があると判断され、識別子判
定ステップ2702で部品開始と判断され、部品情報入
力ステップ2704で第24図に示される部品情報の一
つが入力され、パターン・部品開始情報記憶ステップ2
705で第23図に示すようにパターン・部品の開始行
情報として記憶される。以上の結果、部品分析ステップ
27o6で部品の利用率などを計算し、分析結果出力ス
テップ2707で第18図のオウンコーディング部評価
結果リストとともに第25図に示される部品分析リスト
が出力される。本実施例では部品分析リストと併せてオ
ウンコーディング部のメツセージ付きリストやオウンコ
ーディング評価リストを出力するが、部品分析リストだ
けを出力する代案も容易に実現できる。
In the processing procedure shown in FIG. 21, the steps from the program input section 101 to the pattern ID identification section 2001 are the same as in the embodiment shown in FIG. It is determined whether it is a coding start, a pattern start, or a part start, and if it is identified as a part start, in a part information input step 2704, information on the already registered part shown in FIG. 24 is input. Furthermore, set the part start number to 2nd in 27Q5.
Store it in the table shown in Figure 3. Thus step 27o4
Based on the parts information obtained in step 27, a list showing the usage rate of parts as shown in FIG.
Output from 08. For example, C0B shown in FIG.
Line 109 of the OL source program is determined to have an identifier in the identifier determination step 2701, determined to be the start of a component in the identifier determination step 2702, and one of the component information shown in FIG. 24 is input in the component information input step 2704. , pattern/component start information storage step 2
In step 705, it is stored as pattern/component start line information as shown in FIG. As a result of the above, the parts utilization rate and the like are calculated in the parts analysis step 27o6, and the parts analysis list shown in FIG. 25 is outputted in the analysis result output step 2707 together with the own coding section evaluation result list shown in FIG. 18. In this embodiment, a list with a message from the own coding section and an own coding evaluation list are output together with the parts analysis list, but an alternative solution in which only the parts analysis list is output can be easily realized.

第26図は本発明のソフトウェア評価方法の第6の実施
例の処理手順を示す。第27図は本実施例の出力リスト
である。これはプログラム内のブロックの構造を明らか
にした図で上位のブロックが下位のブロックを呼び出し
ている関係にある。
FIG. 26 shows the processing procedure of the sixth embodiment of the software evaluation method of the present invention. FIG. 27 is an output list of this embodiment. This is a diagram that shows the structure of blocks in a program, with upper blocks calling lower blocks.

また各ブロックごとに評価点が設けられ、評価貞に基づ
いて色分けされてし)る。
In addition, evaluation points are set for each block, and the evaluation points are color-coded based on the evaluation score.

全体分析ステップ108までは第1の実施例と同様の処
理を行う。ブロック範囲構造分析ステップ3011では
ブロック開始を示すrsEcTIONJ文によりブロッ
クの範囲を識別し、ブロックごとの呼出し関係をrPE
RFORMJ命令によって把握してブロック構造情報を
作成する。例えば第15図のプログラム中ニ「PERF
ORMKAISH■」(21o3)力χ見出された場合
、プログラムのブロックMA I N4こブロックKA
ISHIが従属していることを把握できる。
Up to the overall analysis step 108, the same processing as in the first embodiment is performed. In the block range structure analysis step 3011, the range of the block is identified by the rsEcTIONJ statement indicating the start of the block, and the calling relationship for each block is determined by rPE.
The block structure information is created by grasping the information using the RFORMJ command. For example, in the program in Figure 15, "PERF
ORMKAISH (21o3) If found, program block MA I N4 block KA
It is possible to understand that ISHI is subordinate.

次にブロック範囲構造分析ステップ3011で得られた
ブロックの範囲を把握する情報しこ基づき各種数値測定
ステップ3014ではブロック単位しこ各種数値の記述
を行ない、測定結果評価ステップ3012ではその数値
に基づきブロック単位の評価を行う。そして構造ステッ
プ3013でステップ3011で得られたプログラム内
のブロック構造情報とステップ3012で得られた評価
結果より第27図に示されるプログラム内部構造図を出
力する。
Next, based on the information for grasping the block range obtained in the block range structure analysis step 3011, various numerical value measurement step 3014 describes various numerical values for each block, and in the measurement result evaluation step 3012, the blocks are Evaluate units. Then, in a structure step 3013, a program internal structure diagram shown in FIG. 27 is output based on the block structure information within the program obtained in step 3011 and the evaluation result obtained in step 3012.

例えば第22図に示されるソースプログラムは第26図
の処理手順により、プログラム入力ステップ101から
全体分析ステップ108までは、第1の実施例と同様に
分析される。その後ブロック範囲構造分析ステップ30
11でブロックごとの分析を行ない、rPERFORM
 J命令からブロック間の呼び出し関係の構造を把握す
る。こうしてプログラムMAINにはプログラムKAI
SHI、プログラムNAKA、プログラム5tJRYO
、プログラムTSUIKAが従属し、プログラム5UR
YOにはプログラムTSUIKAが従属していることを
把握する。各種数値測定ステップ3014ではブロック
範囲構造分析ステップ3011で得られた情報に基づき
測定し、測定結果評価ステップ3012では測定結果を
評価し、構造図形出カステップ3013では第27図に
示されるプログラム間の構造図が出力される。
For example, the source program shown in FIG. 22 is analyzed in accordance with the processing procedure shown in FIG. 26 from the program input step 101 to the overall analysis step 108 in the same manner as in the first embodiment. Then block range structure analysis step 30
11 performs block-by-block analysis and rPERFORM
Understand the structure of calling relationships between blocks from the J instruction. In this way, program MAIN has program KAI.
SHI, Program NAKA, Program 5tJRYO
, to which program TSUIKA is dependent, program 5UR
It is understood that the program TSUIKA is dependent on YO. In the various numerical value measurement step 3014, measurements are performed based on the information obtained in the block range structure analysis step 3011, in the measurement result evaluation step 3012, the measurement results are evaluated, and in the structural figure output step 3013, between the programs shown in FIG. A structure diagram is output.

第28図は本発明のソフトウェア評価方法の第7の実施
例の処理手順である。第29図は評価対象の四つのC0
BOLのソースプログラムを示す。
FIG. 28 shows the processing procedure of the seventh embodiment of the software evaluation method of the present invention. Figure 29 shows the four C0s to be evaluated.
The BOL source program is shown below.

rCALL 5HOUKEIJ (2901)やrCA
LLURIAGEJ (2902)により、プログラム
CHOUHYOはプログラム5HOUKEIとプログラ
ムURIAGE を呼出している。またrCALL  
5ORTJ(2903)により、プログラム5HOUK
EIはプログラム5ORTを呼出している。第30図は
プログラムの呼び出し関係を示した図で上位のプログラ
ムが下位のプログラムを呼び出している関係を示す。ま
た各プログラムごとに評価点が設けられ、色分けされて
いる。
rCALL 5HOUKEIJ (2901) and rCA
By LLURIAGEJ (2902), program CHOUHYO calls program 5HOUKEI and program URIAGE. Also rCALL
Program 5HOUK by 5ORTJ (2903)
EI is calling program 5ORT. FIG. 30 is a diagram showing the calling relationship of programs, and shows the relationship in which a higher-level program calls a lower-level program. Evaluation points are also provided for each program and are color coded.

本実施例では第29図に示されるような呼出し関係を持
つ複数のプログラムを入力として第28図に示される処
理手順により、第30図に示される複数プログラム間の
呼び出し関係を示した図が出力される。第28図のステ
ップ3201で入力するプログラムが残っているかを判
定し残っているときは残っているプログラムの一つの対
象としてプログラム入力ステップ101以下を行なう。
In this embodiment, a diagram showing the calling relationships between multiple programs as shown in FIG. 30 is output by inputting a plurality of programs having calling relationships as shown in FIG. 29 and performing the processing procedure shown in FIG. 28. be done. In step 3201 of FIG. 28, it is determined whether there are any remaining programs to be input, and if there are any remaining programs, the program input step 101 and subsequent steps are performed as one of the remaining programs.

以下分析評価出力ステップ111まで第1の実施例と同
様の処理を行ない、その後呼出し関係分析ステップ32
03でプログラム間の呼び出し関係をrCALL」命令
から把握して呼、出し関係情報を蓄積する。これは例え
ば第29図においてプログラムC)IOHYOのrCA
LL  5HOUKEIJ (2901)からプログラ
ム5HOUKEIがプログラムCHOUHYOに従属し
ていることが分かるというようにして把握できる。評価
結果蓄積ステップ3204では本プログラムの評価結果
を蓄積する。こうしてすべてのプログラムの分析・評価
を終了すると、3201で入力されるプログラムがない
と判断され、蓄積ステップ3204で蓄積された情報と
ステップ3202で蓄積された呼出し関係情報から評価
結果出力ステップ32o5で第30図に示される図が出
力される。
Hereinafter, the same processing as in the first embodiment is performed up to the analysis evaluation output step 111, and then the call relationship analysis step 32
In step 03, the call relationship between programs is grasped from the "rCALL" command, and call/output relationship information is stored. For example, in Figure 29, program C) IOHYO's rCA
It can be understood from LL 5HOUKEIJ (2901) that program 5HOUKEI is subordinate to program CHOUHYO. In the evaluation result accumulation step 3204, evaluation results of this program are accumulated. When the analysis and evaluation of all programs is completed in this way, it is determined in 3201 that there is no program to be input, and the evaluation result output step 32o5 is performed based on the information accumulated in the accumulation step 3204 and the call related information accumulated in step 3202. The diagram shown in Figure 30 is output.

第31図に、本発明の第8の実施例における処理手順を
示す。本実施例は、第1図に示した実施例に加えて、対
象とするソースプログラムの標準化基準規則に反する部
分の一部について、自動修正することにより、全体の評
価点を向上させるようにしたものである。
FIG. 31 shows the processing procedure in the eighth embodiment of the present invention. In addition to the example shown in Figure 1, this example improves the overall evaluation score by automatically correcting some parts of the target source program that violate the standardization standard rules. It is something.

第31図の例で示す文修正(ステップ4001)、及び
分析結果の出力(ステップ4002)のステップ以外は
第1図で示した実施例と同じである。
The steps shown in the example of FIG. 31 are the same as the embodiment shown in FIG. 1 except for the steps of sentence correction (step 4001) and output of the analysis result (step 4002).

第3図は、C0BOL言語で記述されたソースプログラ
ムの例、第32図は、第31図で示す付置析(ステップ
103)、文分析(ステップ107)。
FIG. 3 shows an example of a source program written in the COBOL language, and FIG. 32 shows the additional analysis (step 103) and sentence analysis (step 107) shown in FIG. 31.

全体分析(ステップ108)によってメモリ内に記憶し
た本実施例における行単位の標準化基準外を示す行メツ
セージの例、第33図は、第3図の例で示すソースプロ
グラムを分析し、文形成した結果に新開始行、新開始カ
ラムの修正、及び新しい文の追加を加えた例、第34図
は、行の記述内容を修正、追加することによって必要の
なくなった行メツセージを削除した前述の第32図で示
した行メツセージの例を示す。
FIG. 33 shows an example of a line message indicating outside the standardization standard for each line in this embodiment, which was stored in the memory by the overall analysis (step 108). The source program shown in the example of FIG. Figure 34 is an example of adding a new start line, new start column, and adding a new sentence to the result. 32 shows an example of the line message shown in FIG.

第32図は、第6図の行メツセージの例に「新符番」の
項目情報を追加し、行の分割、文の追加によってできる
新しい符番を記憶する標準をしている。第33図は、第
7図の文形成結果の例に、「利用有無」、「新開始行」
、「新開始カラム」の各項目情報を追加したテーブルで
ある。「利用有無」は、新ソースプログラムを生成する
際(第31図で示すステップ4002)、文の情報を文
形成結果の情報から得るが、行の情報から得るがを識別
する情報を示し、「新開始行」、「新開始カラム」は、
行の分割、文の追加によってできる新しい符番、「字さ
げ」によってできる新しい開始カラムを記憶する。
In FIG. 32, item information of "new code number" is added to the line message example of FIG. 6, and a new code number created by dividing a line and adding a sentence is stored as a standard. Figure 33 shows an example of the sentence formation result in Figure 7 with "Used or not" and "New start line".
, is a table to which each item information of "new start column" is added. "Used or not" indicates information that identifies whether sentence information is obtained from the sentence formation result information or from line information when generating a new source program (step 4002 shown in FIG. 31). "New start row" and "New start column" are
Memorizes new numbers created by splitting lines and adding sentences, and new starting columns created by "indentation".

第31図の例で示す文修正(ステップ4001)は、標
準化基準規則に反するソースプログラムの行記述のうち
、自動的に修正、追加が可能な行記述について、先準化
基準規則に合うよう行記述内容の修正、追加を行なう、
標準化基準規則に反する行に対するメツセージは、行メ
ツセージとしてメモリ内に記憶しているので、行メツセ
ージを順次調べ、自動的に修正、追加が可能な行メツセ
ージを検出し、メモリ内に記憶した文情報に修正、追加
を行なう。
In the sentence modification (step 4001) shown in the example of Figure 31, among the line descriptions of the source program that violate the standardization standard rules, line descriptions that can be automatically corrected or added are modified to conform to the pre-standardization standard rules. Modify and add written content;
Messages for lines that violate the standardization standard rules are stored in memory as line messages, so line messages are sequentially examined, line messages that can be automatically corrected or added are detected, and sentence information stored in memory is stored. Make corrections and additions.

例えば、第32図で示す行メツセージ4101゜41o
2は、符番「82」の行に不用な字句があることを示し
ている。第33図の例で示す文情報のうち、開始行が「
82」の文情報を検出する。
For example, the line message 4101°41o shown in FIG.
2 indicates that there is an unnecessary token in the line numbered "82". In the sentence information shown in the example in Figure 33, the starting line is "
82" is detected.

文情報4201,4202がこれに該当し、この文情報
から、新ソースプログラムの行を生成することにより、
前述の不用な字句を含まない行にすることが出きること
から、この文情報の4201゜4202の「利用有無」
に新ソースプログラムの行生成に該文情報を利用するこ
とを示す「Y」を設定する。また、第32図で示す行メ
ツセージ4103は、符番「82」の行に複数の文があ
ることを示している。第33図の例で示す文情報のうち
、開始行が「82」の文情報を検出する。文情報420
1.4202が該当する。複数の文情報をそれぞれ1行
に出力するようにするため、同−符番を持つ文情報のう
ち、項番の大きくなる順に2つ目以後の文情報の新開始
行を1ずつ増加させると同時に文情報の親項番と同じ値
を親項番に持つ文情報以外の文情報のうち、最も項番の
値が大きい文情報の開始カラムを文情報の新開始カラム
に設定する。
Statement information 4201 and 4202 correspond to this, and by generating new source program lines from this statement information,
Since it is possible to create a line that does not include the unnecessary words and phrases mentioned above, the "Usage status" of 4201 and 4202 of this text information
"Y" is set to indicate that the statement information is to be used for line generation of the new source program. Further, a line message 4103 shown in FIG. 32 indicates that there are multiple sentences in the line numbered "82". Among the sentence information shown in the example of FIG. 33, sentence information whose starting line is "82" is detected. Sentence information 420
1.4202 is applicable. In order to output multiple pieces of sentence information each on one line, increase the new start line of the second and subsequent sentence information by 1 in the order of increasing item number among the sentence information with the same number. At the same time, among sentence information other than sentence information whose parent item number has the same value as the parent item number of the sentence information, the start column of the sentence information with the largest item number value is set as the new start column of the sentence information.

例えば、文情報4201.4202では、文情報420
2以後の全ての文情報の新、開始行について、1ずつ増
加させ、文情報4202の新開始カラムは、文情報42
01の開始カラムと同じ「15」とする。また、複数の
文情報をそれぞれ別の行として新ソースプログラムを生
成することから、この文情報の「利用有無」にrYJ 
を設定する。
For example, in text information 4201.4202, text information 420
The new start column of sentence information 4202 is incremented by 1 for all new and start lines of sentence information after 2, and the new start column of sentence information 4202 is
Set it to "15", which is the same as the start column of 01. In addition, since a new source program is generated with multiple pieces of statement information each on a separate line, rYJ
Set.

次に、第32図で示す行メツセージ41o4は、符番「
97」の行に1字さげ」がされていない文があることを
示している。第33図の例で示す文情報のうち、開始行
が「97」の文情報を検出する。文情報4203が該当
し、「字さげ」を示す新開始カラムを設定する。この文
情報4203の新開始カラム「19」は、この文情報4
2o3の親項番「87」を項番の値に持つ文情報を検出
し、検出した4204の文情報42o4の開始カラム「
17」に、例えば「2」カラム「字さげ」することを示
すr17+2=19Jがら「19」を算出し設定する。
Next, the line message 41o4 shown in FIG.
This indicates that there is a sentence in the line ``97'' that is not inverted by one character. Among the sentence information shown in the example of FIG. 33, sentence information whose starting line is "97" is detected. Sentence information 4203 corresponds, and a new start column indicating "character inscription" is set. The new start column “19” of this sentence information 4203 is
2o3's parent item number "87" is detected as the item number value, and the detected sentence information of 4204 is the start column of 42o4 "
17'', for example, calculate and set ``19'' from r17+2=19J, which indicates that the ``2'' column is ``indented''.

また、文情報42o3の親項番「87」より値の小さい
親項番を持つ文情報を検出するまで、この文情報420
3より項番が1ずつ増加する方向に順次各文情報の新開
始カラムへ。
Furthermore, until sentence information with a parent item number smaller than the parent item number "87" of sentence information 42o3 is detected, this sentence information 420
From 3 onwards, the item number increases by 1 to the new start column for each sentence information.

開始カラムに例えば「2」カラム加えた値を設定する。For example, set the value by adding "2" columns to the start column.

次に、第32図に示す行メツセージ4105は、付番r
loOJの行に、「字さげ戻り」がされていない文があ
ることを示している。第33図の例で示す文情報のうち
、開始行がrloOJの文情報を検出する。文情報42
o5が該当し、「字さげ戻り」を示す新開始カラムを設
定する。該文情報42o5の新開始カラム「15」は、
この文情報42o5の親項番「82」を、親項番の値に
持つ文情報42o5以外の文情報のうち、最も項番の値
が大きい文情報を検出しく文情報4206カ1該当する
)、検出した文情報の開始カラムを設定したものである
Next, the line message 4105 shown in FIG.
This indicates that there is a sentence in the line loOJ that has not been "back-lined." Among the sentence information shown in the example of FIG. 33, sentence information whose starting line is rloOJ is detected. Sentence information 42
o5 corresponds to this, and a new start column indicating "backward" is set. The new start column “15” of the sentence information 42o5 is
Among the sentence information other than sentence information 42o5 that has the parent item number "82" of this sentence information 42o5 as the value of the parent item number, the sentence information with the largest item number value is detected. (Sentence information 4206 item 1 is applicable) , the start column of the detected sentence information is set.

次に、第32図に示す行メツセージ4106は、付番「
95」の行に含むrIFJ文に始まる構造化プログラミ
ングに関する文情報の並びが構造化されていないことを
示しており、該当する文情報の項名がrIFJであるこ
とを示している。第33図の例で示す文情報のうち、開
始行が「95」の文情報を検出する。文情報4206.
4207が該当するが、項名がrIFJであることから
、文情報4206を対象として、構造化プログラミング
用の文情報の追加を行なう。
Next, the line message 4106 shown in FIG.
This indicates that the sequence of statement information related to structured programming starting with the rIFJ statement included in the line ``95'' is unstructured, and indicates that the item name of the corresponding statement information is rIFJ. Among the sentence information shown in the example of FIG. 33, sentence information whose starting line is "95" is detected. Sentence information 4206.
4207 is applicable, but since the item name is rIFJ, text information for structured programming is added to text information 4206.

まず、この文情報の項番を親項番に持つ文情報のうち項
番が最も小さい文情報を検出する。検出した文情報の項
名がrTHENJでない場合、この文情報の次に項名r
THEN」を持つ新しい文情報を追加する(第33図の
4208)。追加した文情報の項番にこの文情報の項番
に1を加えた値を、親項番にこの文情報の項番の値を、
利用有無に「Y」を、新開始行にこの文情報の開始行に
1を加えた値を、新開始カラムにこの文情報の開始カラ
ムの値に例えば「2」を加えた値を、それぞれ設定する
First, the sentence information having the smallest item number among the sentence information whose parent item number is the item number of this sentence information is detected. If the item name of the detected sentence information is not rTHENJ, the item name r is next to this sentence information.
new sentence information with "THEN" is added (4208 in FIG. 33). Add 1 to the item number of this sentence information to the added sentence information item number, and add the value of this sentence information item number to the parent item number.
Set "Y" to the usage status, set the new start line to the value of the start line of this statement information plus 1, and set the new start column to the value of the start column of this statement information plus, for example, "2". Set.

文情報の追加にともない次の修正を行なう。すなわち、
追加した文情報を除いて、追加した文情報の項番より大
きい値を項番に持つ全ての文情報に対して、項番に1を
加える。追加した文情報と、この文情報の項番を親項番
に持つ項名rE L S EJの文情報を除いて、追加
した文情報の項番より大きい値を項番に持つ全ての文情
報について、この文情報の項番と等しいか大きい値を親
項番に持つ全ての文情報に対して、親項番に1を加える
。また、追加した文情報より大きい値を項番に持つ全て
の文情報に対して、新開始に1を加える。及び、追加し
た文情報の、項番を親項番に持つ全ての文情報に対して
、新開始カラムが追加した文情報の新−始カラムより「
字さげ」 (より大きい値)になっているかチエツクし
、「字さげ」になっていない場合、例えば、「2」を新
開始カラムに加える。
In conjunction with the addition of text information, the following modifications will be made. That is,
Except for the added sentence information, 1 is added to the item number for all sentence information whose item number has a value larger than the item number of the added sentence information. All sentence information whose item number has a value larger than the item number of the added sentence information, except for the added sentence information and the sentence information with item name rE L S EJ whose parent item number is the item number of this sentence information. For all sentence information whose parent item number is equal to or larger than the item number of this sentence information, 1 is added to the parent item number. Furthermore, 1 is added to the new start for all sentence information whose item numbers have values larger than the added sentence information. And, for all statement information whose parent item number is the item number of the added statement information, the new start column is changed from the new start column of the added statement information to "
Check whether the text is set to "Inset" (a larger value), and if it is not set to "Inset", add, for example, "2" to the new start column.

次に、この文情報の項番より大きい項番を持つ文情報の
うち、この文情報の親項番と同じ値を親項番に持つ文情
報で、最も小さい値を項番に持つ文情報を検出する。検
出した文情報の項名がrENDIFJでない場合、検出
した文情報の前に、項名rENDIFJを持つ新しい文
情報を追加する(第33図の4209)、追加した文情
報の項番に検出した文情報の項番の値を、親項番に検出
した文情報の親項番の値を、利用有無に「Y」を、新開
始行に検出した文情報の新開始行の値を、新開始カラム
に該文情報の新開始カラムの値を、それぞれ設定する。
Next, among the statement information with an item number larger than this statement information item number, the statement information whose parent item number has the same value as the parent item number of this statement information, and whose item number has the smallest value. Detect. If the item name of the detected sentence information is not rENDIFJ, add new sentence information with the item name rENDIFJ before the detected sentence information (4209 in Figure 33), and add the detected sentence to the item number of the added sentence information. The value of the item number of the information is set to the parent item number, the value of the parent item number of the detected sentence information is set to "Y" for whether to use it, and the value of the new start line of the detected sentence information is set to the new start line. The value of the new start column of the sentence information is set in each column.

文情報の追加にともない、他の文情報について前述と同
様の項番、親項番の修正を行なう。
Along with the addition of text information, the item numbers and parent item numbers of other text information are corrected in the same manner as described above.

前述までの行メツセージに対する文情報の修正により、
該当する行メツセージは不用となるため、各行メツセー
ジにたいする処理が終了後、該当する行メツセージをメ
モリより削除する。
By modifying the text information for the line messages mentioned above,
Since the corresponding line message is no longer needed, the corresponding line message is deleted from the memory after the processing for each line message is completed.

第34図に、第32図の行メツセージに基づき文情報を
修正した後の行メツセージを示す。
FIG. 34 shows a line message after the sentence information has been corrected based on the line message of FIG. 32.

第31図で示す分析結果の出力(ステップ4002)は
、第1図で示した実施例とほぼ同じであるが。
The output of the analysis results shown in FIG. 31 (step 4002) is almost the same as the embodiment shown in FIG.

出力するソースプログラムの各行は、プログラム入力(
ステップ101)で入力した行と、メモリ内に記憶した
文情報から作成する点、作成した新ソースプログラムを
外部記憶装置にも出力する点が異なる。
Each line of the source program to be output is the program input (
The difference is that the line input in step 101) is created from the sentence information stored in the memory, and the created new source program is also output to an external storage device.

出力するソースプログラムの各行は、出力する付番を文
情報の新開始行に持ち、利用有無がrYJの文情報があ
る場合、該文情報の項目、パラメータ、新開始カラムか
ら、例えば、C0BOL言語構文に従ったソース行を生
成し、出力装置及び外部記憶装置に出力する。出力する
付番を文情報の新開始行に持った文情報の利用有無が「
Y」でない場合、ソース行は、プログラム入力(ステッ
プ101)で入力した該当する行をこの文情報の「開始
カラム−新開始カラム」のカラム数だけ左へずらして出
力装置及び外部記憶装置に出力する。
Each line of the source program to be output has the output number in the new start line of the statement information, and if there is statement information whose use status is rYJ, from the items, parameters, and new start columns of the statement information, for example, the C0BOL language Generates a source line according to the syntax and outputs it to an output device and an external storage device. Whether or not to use the statement information that has the output number in the new start line of the statement information is "
If not, the source line is shifted to the left by the number of columns of "Start Column - New Start Column" of this statement information, and outputs the corresponding line input in the program input (step 101) to the output device and external storage device. do.

第35図に、第3図で示したソースプログラムと第33
図で示した文情報から生成し、出力装置に出力したソー
スプログラムリストの例を示す。
Figure 35 shows the source program shown in Figure 3 and the source program shown in Figure 33.
An example of a source program list generated from the sentence information shown in the figure and output to an output device is shown.

本実施例によれば、標準化基準に反したコーディングを
、特に保守性の「形の見やすさ」、「構造の見やすさ」
に関わる点を標準化基準にそうように自動修正すること
ができ、保守性向上の効果がある。また、ソースプログ
ラム全体を修正するのではなく、見やすさの点で問題の
ある部分のみを修正することにより、できるだけ元のソ
ースプログラムの形で残すことができ、自動修正では困
難な見やすい形の表現を保存できる効果がある。
According to this example, coding that violates standardization standards can be avoided, especially in terms of maintainability, such as "easy to see shape" and "easy to see structure".
It is possible to automatically correct points related to standardization standards, which has the effect of improving maintainability. In addition, by modifying only parts that are problematic in terms of legibility, rather than modifying the entire source program, it is possible to preserve the original source program as much as possible, which is difficult to do with automatic modification. It has the effect of preserving.

第36図に、本発明の第9の実施例における処理手順を
示す。本実施例は、第1図に示した実施例に加えて、対
象とするソースプログラムの作成者を抽出し、予め外部
記憶装置に蓄積されているこの作成者の評価履歴情報と
比較し、その比較結果を出力装置に出力するようにした
ものである。
FIG. 36 shows the processing procedure in the ninth embodiment of the present invention. In addition to the embodiment shown in FIG. 1, this embodiment extracts the creator of the target source program, compares it with the evaluation history information of this creator stored in an external storage device in advance, and extracts the creator of the target source program. The comparison result is output to an output device.

第36図の例で示す評価履歴情報の入力(ステップ50
01)、評価結果の比較(ステップ5002)。
Input of evaluation history information shown in the example of FIG. 36 (step 50)
01), comparison of evaluation results (step 5002).

及び評価比較結果の出力(ステップ5003)以外は、
第1図で示した実施例と同じである。
Other than outputting the evaluation comparison results (step 5003),
This is the same as the embodiment shown in FIG.

第37図は、作成者毎の評価履歴情報の例、第38図は
、対象とするソースプログラムの評価と該ソースプログ
ラムの作成者の評価履歴情報の比較を行なった評価比較
結果リストの例を示す。
Figure 37 shows an example of evaluation history information for each creator, and Figure 38 shows an example of an evaluation comparison result list that compares the evaluation of a target source program with the evaluation history information of the creator of the source program. show.

第36図の例で示す評価履歴情報の入力(ステップ50
01)は、対象とするソースプログラムの文形成(ステ
ップ1o5)によって得た文形成結果のソースプログラ
ムの作成者名(例えば、C0BOL言語のAUTHOR
文による、あるいは、特定の識別記号を用いたコメント
による等)を識別子として、外部記憶装置内に蓄積して
いる評価履歴情報をメモリ内に入力する。
Input of evaluation history information shown in the example of FIG. 36 (step 50)
01) is the name of the creator of the source program (for example, AUTHOR of the COBOL language
The evaluation history information stored in the external storage device is input into the memory using a sentence (or a comment using a specific identification symbol, etc.) as an identifier.

例えば、第37図で示す項目名「作成者名」の値[ヒタ
チ タロウJ  (5101)は、評価履歴情報を識別
する値である、また、項目名「サンプル数」の値r5」
 (5102)は、ソースプログラムの該作成者の今ま
でに行なった評価の回数が「5」回であることを示して
おり、評価点群5103は、項目名で示す評価項目につ
いて、前「5」の評価によって得た評価点の合計値を示
す。
For example, the value of the item name "Creator name" shown in FIG. 37 [Hitachi Taro J (5101) is a value that identifies evaluation history information, and the value r5 of the item name "Number of samples"]
(5102) indicates that the number of evaluations performed by the creator of the source program so far is "5", and the evaluation point group 5103 indicates that the number of evaluations performed by the creator of the source program is "5". ” indicates the total score obtained from the evaluation.

次に、第36図の例で示す評価結果の比較(ステップ5
002)は、分析結果の評価(ステップ111)で得た
評価点と、評価履歴情報の入力(ステップ5001)で
得た評価点の平均の差を求める。
Next, compare the evaluation results shown in the example of Fig. 36 (step 5).
002) calculates the difference between the average of the evaluation points obtained in the evaluation of the analysis results (step 111) and the evaluation points obtained in the input of evaluation history information (step 5001).

まず、メモリ内に記憶した評価履歴情報の各項目の評価
点をサンプル数で除算し、この数値とメモリ内に記憶し
た評価結果情報の各項目毎の評価点の差を求める。
First, the evaluation score for each item of the evaluation history information stored in the memory is divided by the number of samples, and the difference between this value and the evaluation score for each item of the evaluation result information stored in the memory is determined.

次に、該ソースプログラムの評価結果、履歴情報の平均
の評価点、及び、第2項の差の評価比較結果を評価項目
ごとに出力装置に出力する(ステップ5003)と同時
に、該ソースプログラムの各評価項目毎の評価点を履歴
情報の各評価項目毎の評価点に加え、項目名「サンプル
数」の値に1を加え、外部記憶装置に出力する。
Next, the evaluation result of the source program, the average evaluation score of the history information, and the evaluation comparison result of the difference in the second term are output for each evaluation item to the output device (step 5003), and at the same time, The evaluation points for each evaluation item are added to the evaluation points for each evaluation item in the history information, 1 is added to the value of the item name "number of samples," and the result is output to an external storage device.

本実施例によれば、ソースプログラムの作成者毎に評価
結果を累積することができ、プログラム作成者毎の質の
向上、あるいは、作成者毎の標準化コーディングに対す
る時系列な管理を行なうことができる効果がある。また
、本実施例の評価履歴情報を識別する値を「作成者」の
代りに、「作成者グループ」あるいは「作成会社」にす
ることにより、前述の質の向上、管理を「作成者グルー
プ」、「作成会社」毎に行なうことが出きる。
According to this embodiment, evaluation results can be accumulated for each source program creator, and quality improvement for each program creator or standardized coding for each creator can be managed in chronological order. effective. In addition, by changing the value that identifies the evaluation history information in this example to "creator group" or "creator company" instead of "creator," the above-mentioned quality improvement and management can be achieved by "creator group". , can be done for each "creating company".

また、「作成者」、「作成者グループ」あるいは「作成
会社」をプログラムから抽出するのではなく、利用者が
入力して、推定することも容易に実現できる。
Furthermore, the user can input and estimate the "creator", "creator group", or "creator company" instead of extracting them from the program.

また、評価履歴情報内の評価情報を「作成者」間、「作
成者グループ」間、あるいは、「作成会社」間などで相
互比較して出力することも容易に実現できる。
Furthermore, it is also possible to easily compare and output the evaluation information in the evaluation history information between "creators", "creator groups", or "creator companies".

第39図に1本発明の第10の実施例における処理手順
を示す。本実施例は、第1図に示した実施例とほぼ同様
であるが、分析結果の出力において、ソースプログラム
の内、対応する行メツセージがある行のみを、対応する
行メツセージと対にして出力する点のみが異なる。
FIG. 39 shows a processing procedure in a tenth embodiment of the present invention. This embodiment is almost the same as the embodiment shown in FIG. 1, but in outputting the analysis results, only the lines in the source program that have corresponding line messages are output in pairs with the corresponding line messages. The only difference is that

第39図の例で示す分析結果の出力(ステップ6001
)のステップ以外は、第1図で示した実施例と同じであ
る。
Output of analysis results shown in the example of FIG. 39 (step 6001
) is the same as the embodiment shown in FIG.

第39図は第3図の例で示すソースプログラムの分結結
果を出力装置に出力した例を示す。
FIG. 39 shows an example in which the result of dividing the source program shown in the example of FIG. 3 is output to an output device.

例えば、第3図の例で示すソースプログラムは、第10
図のプログラム入力(ステップ101)において、メモ
リ内に入力した行を単位に記憶している。第39図の分
析結果の出力(ステップ6001)のステップは、記憶
された行に対し、第6図の例で示す行メツセージ中に、
この行と同じ付番を持つ行メツセージがある場合、順次
、付番とメツセージを付加して出力する。第3図の例で
示す行301は、第40図テ示す行901 ニ項番「8
2」(902)と同時に出力し、第6図の例で示す項番
「82」を持つ行メツセージ群(609)を同時に出力
する(903)。第9図の出力例と異なり、対応する行
メツセージがないソース行は出力しない。
For example, the source program shown in the example of FIG.
In the program input (step 101) shown in the figure, the input line is stored in the memory in units of units. The step of outputting the analysis results (step 6001) in FIG.
If there is a line message with the same number as this line, the number and message are added and output in order. The row 301 shown in the example of FIG. 3 is the row 901 shown in FIG.
2" (902), and the line message group (609) having the item number "82" shown in the example of FIG. 6 is output at the same time (903). Unlike the output example shown in FIG. 9, source lines without corresponding line messages are not output.

本発明の実施例は、以上に説明した処理手順を有するの
で、以下に記載されるような効果を有する。
Since the embodiment of the present invention has the processing procedure described above, it has the effects described below.

プログラムの解析により、プログラム内の保守性に問題
のあるプログラム記述を検出し、その保守性に関する問
題を示す情報と関連づけて出力することができるので、
利用者は保守性が悪い個所とその問題を容易に知り、対
策を立てることができる。
By analyzing the program, it is possible to detect program descriptions with maintainability problems in the program and output them in association with information indicating the maintainability problems.
Users can easily learn about areas with poor maintainability and their problems, and take countermeasures.

又、ソースプログラムの内で、上記の保守性に問題のあ
るプログラム記述を含む行を、その保守性に関する問題
を示す情報と関連づけて出力することができる。
Furthermore, lines in the source program that include program descriptions with problems in maintainability can be output in association with information indicating the problems in maintainability.

又、ソースプログラムの中の上記の保守性に問題のある
プログラム記述を含む行に対し、その保守性に関する問
題を示す情報と関連づけて、該ソースプログラムを出力
することができる。
Further, it is possible to output the source program by associating the line containing the program description with the problem with maintainability with information indicating the problem with maintainability in the source program.

又、自動的に保守性の評価点を算出し、図表形式で出力
出来るので、利用者は容易にプログラムの保守性の評価
や保守性向上策の立案が出来る効果がある。
Furthermore, since the maintainability evaluation score can be automatically calculated and output in a chart format, the user can easily evaluate the maintainability of the program and formulate measures to improve maintainability.

又、上記の検出・評価の対象となるプログラム記述情報
の種別や評価基準を利用者が設定・変更出来るのでその
使用部署に合った評価基準による保守性の評価を容易に
行ないつる効果がある。
Furthermore, since the user can set and change the type and evaluation criteria of the program description information to be detected and evaluated, it is possible to easily evaluate maintainability using evaluation criteria suitable for the department in which it is used.

又、プログラム内の保守性に問題のあると定めた文、即
ち、Go  TO文+ ALTER文、あるいは標準に
反すると定めた文などの使用箇所の検出や、その使用数
・使用率を基準として保守性を評価することが出来る。
In addition, it is possible to detect the usage of statements in a program that have problems with maintainability, such as Go TO statements + ALTER statements, or statements that violate standards, and to analyze the number and usage rate of these statements. Maintainability can be evaluated.

又、最後にEND−IFが付けられていないIF文、T
HEN、ELSEが共に付けられてないIF文などの、
保守性に問題があると定めた文記法の使用箇所の検出や
、その使用数・使用率を基準として保守性を評価するこ
とが出来る。
Also, an IF statement without END-IF at the end, T
IF statements without both HEN and ELSE, etc.
It is possible to detect the usage of grammar notation that has problems with maintainability, and to evaluate maintainability based on the number and usage rate of the usage.

又、行くさぎがプログラムの上方にあるG。Also, the going rabbit is G at the top of the program.

TO文やPERFORM文などの、保守性に問題のある
と定めた実行文の使用箇所の検出や、その使用数・使用
率を基準として、保守性を評価することが出来る。
Maintainability can be evaluated based on the detection of usage locations of executable statements determined to have maintainability problems, such as TO statements and PERFORM statements, and the number of uses and usage rates.

又、「、」、「;」など保守性に問題があると定めた字
句区切り情報の使用箇所の検出や、その使用数・使用率
を基準として、保守性を評価することが出来る。
Furthermore, the maintainability can be evaluated based on the detection of the usage of lexical delimiter information such as ",", ";", etc. that is determined to have a maintainability problem, and the number and usage rate of the information.

又、同一行に複数の文を持つ箇所、IF文やPERFO
RM文等の内に含まれる字下げ対象文の内で、字下げを
行なっていない文、あるいは、字下げ対象範囲から出た
文の内で字さげから戻していない文、などのプログラム
内の記述位置に関し保守性の問題があると定めた記述情
報の使用箇所の検出や、その使用数・使用率を基準とし
て、保守性を評価することが出来る。
Also, places with multiple statements on the same line, IF statements and PERFO
In the program, such as a sentence that is not indented among the indented sentences included in the RM statement, etc., or a sentence that has come out of the indented range and has not been returned from the indented position. Maintainability can be evaluated based on the detection of the usage location of descriptive information determined to have a maintainability problem regarding the description position, and the number and usage rate of the usage.

又、プログラム内部手続きの行数あるいは文数、あるい
はそれらの少なくともいずれかの平均値あるいは最大値
等のプログラム内部手続きのサイズ情報を基準として、
保守性を評価することが出来る。
Also, based on the size information of program internal procedures such as the number of lines or sentences of program internal procedures, or the average value or maximum value of at least one of them,
Maintainability can be evaluated.

又、プログラム内のコメント行数あるいは比率を基準と
して、保守性を評価することが出来る。
Furthermore, maintainability can be evaluated based on the number or ratio of comment lines in a program.

又、プログラムの行数、手続き部行数、プログラム内の
文数、手続き部内の実行文数、などのプログラムサイズ
に関する情報を基準として、保守性を評価することが出
来る。
Furthermore, maintainability can be evaluated based on information regarding the program size, such as the number of lines in the program, the number of lines in the procedure division, the number of statements in the program, and the number of executable statements in the procedure division.

又、プログラムを解析して、プログラム内のコメント情
報による、プログラムパターン・部品の使用の有無の出
力、あるあは追加コーデイグの部分・プログラムパター
ン・部品の部分の行数、実行文数、或いはそれらの比率
等のサイズ情報の出力、あるいは、追加コーディング部
分内のプログラムに対する保守性の評価・出力を行なう
ことができるので、プログラムパターン・部品を用いて
プログラムを開発する場合のプログラム保守性の評価や
、ひいては保守性向上策の立案を容易に行なうことがで
きる。
In addition, by analyzing the program, output the presence or absence of use of program patterns and parts based on comment information in the program, or the number of lines and executable statements of additional coding parts, program patterns, and parts, or the like. It is possible to output size information such as the ratio of , or to evaluate and output the maintainability of the program in the additional coding part. Therefore, it is possible to easily formulate measures to improve maintainability.

又、上記のプログラムパターン・部品による部分と追加
コーディングの部分の識別を、該当パターンに対応した
。プログラムパターン・部品による部分と追加コーディ
ングの部分との識別情報を入力し、その情報を用いて、
識別して行なうことにより、コメント情報だけではプロ
グラム・部品の部分が識別できない場合も、上記のプロ
グラムパターン・部品の使用の有無の出力、あるいは追
加コーディング・プログラムパターン・部品の部分のサ
イズ情報の出力、あるいは、追加コーディング部分内の
プログラムに対する保守性の評価・出力を行なうことが
でき、プログラムパターン・部品を用いてプログラムを
開発する場合のプログラム保守性の評価や、ひいては保
守性向上策の立案を容易に行なうことができる。
In addition, the above-mentioned program pattern/part part and additional coding part are identified according to the corresponding pattern. Enter the identification information of the program pattern/component part and the additional coding part, and use that information to
By identifying and performing this, even if the program/part part cannot be identified from comment information alone, it is possible to output whether or not the above program pattern/part is used, or to output size information of the additional coding/program pattern/part part. Alternatively, it is possible to evaluate and output the maintainability of the program in the additional coding part, and to evaluate the maintainability of the program when developing a program using program patterns and parts, and to formulate measures to improve maintainability. It can be done easily.

又、該当パターン・部品に関する保守性の指標となる計
測情報を入力し、その情報を用いて、プログラムパター
ン・部品による部分・追加コーディングの部分のサイズ
に関する情報の取得、あるいは追加コーディング部分の
保守性の評価を行なうことにより、プログラム内のパタ
ーン・部品より作成された部分の保守性の指標となる情
報を計測することなく、プログラムパターン・部品を用
いてプログラムを開発する場合のプログラム保守性の評
価や、ひいては保守性向上策の立案を容易に行なうこと
ができる。
In addition, you can input measurement information that is an index of maintainability for the corresponding pattern/part, and use that information to obtain information about the size of the program pattern/part part/additional coding part, or to evaluate the maintainability of the additional coding part. By evaluating program maintainability when developing a program using program patterns and parts, without measuring information that is an index of the maintainability of parts created from patterns and parts in the program. Furthermore, it is possible to easily formulate measures to improve maintainability.

又、プログラムを解析してプログラム内構造図情報を作
成しその中に各内部手続きごとの評価点を色や形状で区
別してビジュアルに出力することが出来るので、利用者
はプログラム内の保守性の特に悪い内部手続きを知り、
対策を立てることが容易に出来る。
In addition, the program can be analyzed to create internal program structure diagram information, and the evaluation points for each internal procedure can be visually output by distinguishing them by color and shape, allowing users to check the maintainability of the program. Be aware of particularly bad internal procedures;
Countermeasures can be easily taken.

又、指定されたプログラム群を構成する各プログラムに
対し、プログラム間の関連図情報を作成し、その中に各
プログラムごとの評価点を色や形状で区別してビジュア
ルに出力することが出来るので、利用者は保守性の特に
悪い内部手続きを知り、対策を立てることが容易に出来
る。
In addition, for each program that makes up a specified program group, it is possible to create relationship diagram information between programs, and visually output the evaluation points for each program, distinguishing them by color and shape. Users can easily learn about internal procedures that are particularly poorly maintained and take countermeasures.

又、開発した各プログラムに対し、保守性の評価情報を
得、その評価情報を人やグループ別、あるいは時系列毎
に集計して、比較出力出来るので、人やグループ別に、
開発するプログラムの保守性の向上策を立てることが容
易になる。
In addition, it is possible to obtain maintainability evaluation information for each program developed, aggregate the evaluation information by person or group, or by time series, and output it for comparison.
This makes it easier to devise measures to improve the maintainability of programs being developed.

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

以上に示したように、本発明によれば、プログラム内の
保守性の悪い箇所の検出や、プログラムの保守の容易さ
の評価を効率的に行うことができ、ひいてはソフトウェ
アの保守性の向上策を立てることが容易になるなど、優
れた効果を奏するものである。
As described above, according to the present invention, it is possible to efficiently detect parts of a program with poor maintainability and to evaluate the ease of maintenance of the program, and furthermore, it is possible to take measures to improve the maintainability of the software. It has excellent effects, such as making it easier to stand up.

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

第1図は本発明の第1の実施例における処理手順を示す
図、第2図は本発明のハードウェア環境を示す図、第3
図は評価対象のC0BOLソースプログラムの例、第4
図はプログラムの分析にょリ得た字句情報の例、第5図
はプログラムのチエツクに使用する標準化基準規則の例
、第6図は、基準外の行の行メツセージの記憶情報の例
、第7図はプログラムの分析により得た文情報の例、第
8図はプログラムの各種数値情報の収集結果のメモリ内
記憶情報の例、第9図はソースプログラムの分析結果の
出力例、第10図は評価基準規則の例、第11図、第1
2図は、評価結果の出力例、第13図は本発明の第2の
実施例における処理手順を示す図、第14図は本発明の
第3の実施例における処理手順を示す図、第15図は評
価対象のC0BOLソースプログラムの例、第16図は
標準パターンに対応したオウンコーディング部識別用テ
ーブルの例、第17図は標準パターン部/オウンコーデ
ィング部の開始符番記憶テーブル例、第18図はオウン
コーディング評価結果の出力例、第19図は本発明の第
4の実施例における処理手順を示す図、第20図は評価
対象のC0BOLソースプログラムの例、第21図は本
発明の第5の実施例における処理手順を示す図、第22
図は評価対象のC0BOLソースプログラムの例、第2
3図は標準パターン・部品部/オウンコーディング部の
開始符番記憶テーブルの例、第24図は部品名称・ステ
ップ情報テーブルの例、第25図は部品分析リストの例
、第26図は本発明の第6の実施例における処理手順を
示す図、第27図はプログラム内部構造図の出力例、第
28図は本発明の第7の実施例における処理手順を示す
図、第29図は評価対象の複数C0BOLソースプログ
ラムの例、第30図は複数プログラム間の呼出し関係図
の出力例、第31図は本発明の第8の実施例における処
理手順を示す図、第32図は基準外の行メツセージの記
憶情報の例、第33図は修正した文情報例、第34図は
不要行メツセージを削除した行メツセージの記憶情報の
例、第35図は修正されたソースプログラムの分析結果
の出力例、第36図は本発明の第9の実施例における処
理手順を示す図、第37図は作成者毎の評価履歴情報の
例、第38図は対象ソースプログラムと評価履歴情報の
比較結果リストの例、第39図は本発明の第10の実施
例における処理手順を示す図、第40図はソースプログ
ラムの分析結果の出力例である。 101・・・プログラム1行入力ステップ、102・・
・プログラム入力終了判定ステップ、103・・・付置
析ステップ、104・・・コメント行判定ステップ、1
05・・・文形成ステップ、106・・・1文形成判定
ステップ、107・・・文分析ステップ、108・・・
全体分析ステップ、109・・・各種数値判定ステップ
、110・・・分析結果出力ステップ、111・・・分
析結°果評価ステップ、112・・・評価結果出力ステ
ップ、301・・・プログラム行、302・・・プログ
ラムコメント行、401・・・字句、402・・・行番
、403・・開始カラム、404〜406・・・字句情
報、407〜408・・・字句情報、409〜410・
・・字句情報群、501〜507・・・標準化基準規則
、601〜608・・・行メツセージ、609・・・行
メツセージ群、701・・・文情報、702・・・頂角
、703・・・開始行、704・・・開始カラム、70
5・・・パラメータ、706・・・項番、707・・・
親項番、708〜718・・・文情報、901・・・ソ
ース行、902・・・行番、903・・・行メツセージ
群、1001・・・評価規準規則項目名、1002・・
・条件、1003・・・評価点、10o4・・・条件、
1005・・・評価点、1006・・・評価基準項目名
、1007・・・算出式、1301・・・規則入力ステ
ップ、2o01・・・パターンID識別ステップ、20
02・・・パターン情報入力ステップ、2003・・・
識別子判定ステップ、2004・・・オウンコーディン
グ開始情報記憶ステップ、2005・・パターン開始情
報記憶ステップ、2006・・・オウンコーディング範
囲決定ステップ、2008・・オウンコーディング範囲
内数値測定ステップ、2009・・・オウンコーディン
グ部分析結果出カステップ、2010・・・オウンコー
ディング部分枦結果評価ステップ、2011・・・オウ
ンコーディング部評価結果出カステップ、2101・・
・パターンIDを含むコメント行、2102・・・パタ
ーンID、2103パ・ブロック呼出し文、2201・
・・パターンより、2202.2204・・・パターン
/オウンコーディング識別情報、2203,2205・
・・識別ID、2501・・・パターンID記憶ステッ
プ、2502・・・識別子判定ステップ、2701・・
・識別子有無判定ステップ、2702・・・識別子判定
ステップ、2704・・・部品情報入力ステップ、27
o5・・・パターン・部品開始情報記憶ステップ、27
06・・・部品分析ステップ、2901〜2903・・
・他プログラム呼出し文、3011・・・ブロック範囲
と構造の分析ステップ、3012・・・測定結果の評価
ステップ、3o13・・・構造図出力ステップ、301
4・・・各種数値測定ステップ、3201・・・該当プ
ログラム判別ステップ、32o3・・・呼出し関係分析
ステップ、32o4・・・評価結果蓄積ステップ、32
05・・・評価結果出力ステップ、4001・・・文修
正ステップ、4002・・・分析結果出力ステップ、4
101〜4106・・・行メツセージ、4201〜42
09・・・文情報、5001・・・評価履歴情報入力ス
テップ、5002・・・評価結果比較ステップ、50o
3・・・評価比較結果出力ステップ、51o1・・・作
成書名、5102・・・サンプル名、5103・・・評
価点群、6001・・・分析結果の出力ステップ。 ¥ フ 図 系 4 山 第 す 命 第 図 妬 り 図 柘 8 図 第 lOの (A) (8) 第 図 第 1λ 図 衿慢や駁 ’n#5酢11FIC,,,I 葛 l今 已 第 3 図 第 S 図 系 tb 因 第 1? 図 某 ノア 菌 第 9 団 葛 20 図 ! ス2 図 第 1 図 第 3 図 第24図 (久) (しン (C) (d) 2b 釦 第 5I5 第 27 因 (久) <−’o) 某 28図 某 0 聞 (Q) 囁 q 因 第 1 図 第 32 図 4 図 葛 3ヨ 図 〃 5 饗 3b 団 第 3 第 3r′I 口 夷 9 図
FIG. 1 is a diagram showing the processing procedure in the first embodiment of the present invention, FIG. 2 is a diagram showing the hardware environment of the present invention, and FIG.
The figure shows an example of a C0BOL source program to be evaluated.
Figure 5 shows an example of lexical information obtained through program analysis, Figure 5 shows an example of standardization standard rules used to check a program, Figure 6 shows an example of memory information for line messages of non-standard lines, and Figure 7 The figure shows an example of sentence information obtained by analyzing a program, Fig. 8 shows an example of information stored in memory as a result of collecting various numerical information of a program, Fig. 9 shows an example of the output of the analysis result of a source program, and Fig. 10 shows an example of the output of the analysis result of a source program. Example of evaluation criteria rules, Figure 11, Part 1
2 shows an example of output of the evaluation results, FIG. 13 shows the processing procedure in the second embodiment of the present invention, FIG. 14 shows the processing procedure in the third embodiment of the invention, and FIG. 15 shows the processing procedure in the third embodiment of the invention. The figure shows an example of a COBOL source program to be evaluated, FIG. 16 shows an example of an own coding section identification table corresponding to a standard pattern, FIG. 17 shows an example of a starting number storage table for standard pattern sections/own coding sections, and FIG. The figure shows an example of the output of the own coding evaluation result, FIG. 19 shows the processing procedure in the fourth embodiment of the present invention, FIG. 20 shows an example of the C0BOL source program to be evaluated, and FIG. Diagram showing the processing procedure in Example 5, No. 22
The figure shows an example of a C0BOL source program to be evaluated.
Figure 3 is an example of a standard pattern/component part/own coding part start number storage table, Figure 24 is an example of a part name/step information table, Figure 25 is an example of a parts analysis list, and Figure 26 is an example of the present invention. FIG. 27 is an output example of a program internal structure diagram, FIG. 28 is a diagram showing the processing procedure in the seventh embodiment of the present invention, and FIG. 29 is an evaluation target An example of multiple C0BOL source programs, FIG. 30 is an output example of a call relationship diagram between multiple programs, FIG. 31 is a diagram showing the processing procedure in the eighth embodiment of the present invention, and FIG. 32 is a diagram showing non-standard lines. An example of message memory information, Figure 33 is an example of corrected sentence information, Figure 34 is an example of memory information of a line message from which unnecessary line messages have been deleted, and Figure 35 is an output example of the analysis result of a revised source program. , FIG. 36 is a diagram showing the processing procedure in the ninth embodiment of the present invention, FIG. 37 is an example of evaluation history information for each creator, and FIG. 38 is a comparison result list of the target source program and evaluation history information. For example, FIG. 39 is a diagram showing the processing procedure in the tenth embodiment of the present invention, and FIG. 40 is an example of output of the analysis result of the source program. 101... Program one line input step, 102...
- Program input end determination step, 103...Additional analysis step, 104...Comment line determination step, 1
05... Sentence formation step, 106... 1 sentence formation judgment step, 107... Sentence analysis step, 108...
Overall analysis step, 109...Various numerical value judgment step, 110...Analysis result output step, 111...Analysis result evaluation step, 112...Evaluation result output step, 301...Program line, 302 ...Program comment line, 401... Lexical, 402... Line number, 403... Start column, 404-406... Lexical information, 407-408... Lexical information, 409-410.
... Lexical information group, 501-507... Standardization standard rules, 601-608... Line message, 609... Line message group, 701... Sentence information, 702... Vertex angle, 703...・Start row, 704...Start column, 70
5...Parameter, 706...Item number, 707...
Parent item number, 708-718...Text information, 901...Source line, 902...Line number, 903...Line message group, 1001...Evaluation criteria rule item name, 1002...
・Condition, 1003...Evaluation point, 10o4...Condition,
1005... Evaluation score, 1006... Evaluation standard item name, 1007... Calculation formula, 1301... Rule input step, 2o01... Pattern ID identification step, 20
02...Pattern information input step, 2003...
Identifier determination step, 2004... Own coding start information storage step, 2005... Pattern start information storage step, 2006... Own coding range determination step, 2008... Own coding range measurement step, 2009... Own Coding part analysis result output step, 2010... Own coding part result evaluation step, 2011... Own coding part evaluation result output step, 2101...
・Comment line including pattern ID, 2102...Pattern ID, 2103 Pa block call statement, 2201.
...From the pattern, 2202.2204...Pattern/own coding identification information, 2203,2205.
...Identification ID, 2501...Pattern ID storage step, 2502...Identifier determination step, 2701...
- Identifier presence/absence determination step, 2702... Identifier determination step, 2704... Parts information input step, 27
o5... Pattern/component start information storage step, 27
06...Parts analysis step, 2901-2903...
- Other program call statement, 3011...Block range and structure analysis step, 3012...Measurement result evaluation step, 3o13...Structure diagram output step, 301
4...Various numerical value measurement step, 3201...Applicable program determination step, 32o3...Calling relationship analysis step, 32o4...Evaluation result accumulation step, 32
05...Evaluation result output step, 4001...Sentence correction step, 4002...Analysis result output step, 4
101-4106... line message, 4201-42
09...Text information, 5001...Evaluation history information input step, 5002...Evaluation result comparison step, 50o
3... Evaluation comparison result output step, 51o1... Created book name, 5102... Sample name, 5103... Evaluation point group, 6001... Analysis result output step. ¥ Fu diagram system 4 Yama daisu no life diagram envy diagram 8 Figure 1 λ (A) (8) Figure 1 λ Figure arrogance and rebuttal 3 Diagram S Diagram tb Cause 1? Figure Certain Noah Bacteria No. 9 Group Kuzu 20 Figure! S2 Figure 1 Figure 3 Figure 24 (Hi) (Shin (C) (d) 2b Button No. 5 I5 27th Cause (Hi) <-'o) Certain 28 Figure Certain 0 Listen (Q) Whisper q Figure 1 Figure 32 Figure 4 Figure 3 Figure 5 3b Dan 3rd r'I Figure 9

Claims (1)

【特許請求の範囲】 1、少なくとも1つのプログラムを解析して、その解析
情報により、プログラム内の保守性に問題のある記述情
報を検出し、保守性に問題のある原因を示した情報と関
連づけて出力することを特徴とするソフトウェア評価方
法。 2、検出されたプログラム内の保守性に問題のある記述
情報もしくは保守性の指標となる記述情報の有無あるい
は数を計測し、その計測情報をもとに、定められた評価
基準に従つて、評価点を算出し、これを図表形式で出力
することを特徴とする請求項1記載のソフトウェア評価
方法。 3、上記検出、計測対象となるプログラム記述情報種別
、あるいは評価基準を、利用者が設定・変更し、このプ
ログラム記述情報種別情報に基づき、保守性に問題のあ
る記述情報とその原因情報の出力、もしくは上記計測情
報の出力、あるいはこの計測情報と上記評価基準により
評価結果を得て、図表形式で出力することを特徴とする
請求項1又は2記載のソフトウェア評価方法。 4、ソースプログラム中の、GOTO文又はALTER
文の、保守性に問題のあると定めた文、あるいは標準に
反すると定めた文の情報を含むプログラム記述情報を検
出し、このプログラム記述情報に基づき、問題のあると
定めた該記述情報とその原因情報の出力、もしくは該記
述情報の計測・出力、あるいはこの計測情報と上記評価
基準により評価結果を得て、図表形式で出力することを
特徴とする、請求項1又は2記載のソフトウェア評価方
法。 5、ソースプログラム中の、最後にEND−IFが付け
られていないIF文、あるいは、THEN、ELSEを
共に含まないIF文の、保守性に問題があると定めた文
記法を含むプログラム記述情報を検出し、このプログラ
ム記述情報に基づき、問題のあると定めた該記述情報と
その原因情報の出力、もしくは該記述情報の計測・出力
、あるいはこの計測情報と上記評価基準により評価結果
を得て、図表形式で出力することを特徴とする、請求項
1又は2記載のソフトウェア評価方法。 6、ソースプログラム中の、行く先がプログラムの上方
にあるGOTO文又はPERFORM文の保守性に問題
のあると定めた実行文を含むプログラム記述情報を検出
し、このプログラム記述情報に基づき、保守性に問題が
あると定めた記述情報とその原因情報の出力もしくは該
記述情報の計測・出力、あるいはこの計測情報と上記評
価基準により評価結果を得て、図表形式で出力すること
、の少なくともいずれかを行うことを特徴とする、請求
項1又は2記載のソフトウェア評価方法。 7、ソースプログラム中の、「,」、「;」の保守性に
問題があると定めた字句区切り情報を含むプログラム記
述情報を検出し、このプログラム記述情報に基づき、上
記の方法で、保守性に問題があると定めた記述情報とそ
の原因情報の出力、もしくは該記述情報の計測・出力、
あるいはこの計測情報と上記評価基準により評価結果を
得て、図表形式で出力することを特徴とする請求項1又
は2記載のソフトウェア評価方法。 8、ソースプログラム中の、同一行に複数の文を持つ箇
所、字下げ対象文の内で、字下げを行なつていない文、
あるいは、字下げ対象範囲から出た文の内で字さげから
戻していない文のプログラムの記述位置に関し保守性の
問題があると定めた記述を含むプログラム記述情報を検
出し、このプログラム記述情報に基づき、保守性に問題
があると定めた記述情報とその原因情報の出力、あるい
は該記述情報の計測・出力、あるいはこの計測情報と上
記評価基準により評価結果を得て、図表形式で出力する
ことを特徴とする、請求項1又は2記載のソフトウェア
評価方法。 9、ソースプログラム中の、プログラム内部手続きの行
数あるいは文数、あるいはそれらの少なくともいずれか
の平均値あるいは最大値等のプログラム内部手続きサイ
ズ情報を含むプログラム記述情報を計測し、このプログ
ラム記述情報に基づき、上記の方法で、保守性に問題が
あると定めた記述情報とその原因情報の出力、あるいは
該記述情報の計測・出力、あるいはこの計測情報と上記
評価基準により史価結果を得て、図表形式で出力するこ
と、の少なくともいずれかを行うことを特徴とする、請
求項1又は2記載のソフトウェア評価方法。 10、ソースプログラム内のコメント行の行数又は比率
の情報を含むプログラム記述情報を計測し、このプログ
ラム記述情報に基づき、上記の方法で、保守性に問題が
あると定めた記述情報とその原因情報の出力、もしくは
該記述情報の計測・出力、あるいはこの計測情報と上記
評価基準により評価結果を得て、図表形式で出力するこ
とを特徴とする、請求項1又は2記載のソフトウェア評
価方法。 11、ソースプログラム内のプログラムの行数、手続き
部行数、プログラム内の文数又は手続き部内の実行文数
のプログラム全体のサイズに関する情報を含むプログラ
ム記述情報を計測し、このプログラム記述情報に基づき
、上記の方法で、保守性に問題があると定めた記述情報
とその原因情報の出力、もしくは該記述情報の計測・出
力、あるいはこの計測情報と上記評価基準により評価結
果を得て、図表形式で出力することを特徴とする、請求
項1又は2記載のソフトウェア評価方法。 12、少なくとも1つのプログラムを解析して、該プロ
グラム内の、予め作成された半完成プログラムであるプ
ログラムパターン・部品の使用の有無、あるいはプログ
ラムパターン・部品による部分と追加コーディングの部
分の識別をコメント内の識別情報により行ない、プログ
ラムパターン・部品の使用の有無の出力、もしくは追加
コーディング部分・プログラムパターン・部品部分の、
行数、実行文数、或いはそれらの比率等のサイズ情報の
出力を行なうことを特徴とする請求項1又は2記載のソ
フトウェア評価方法。 13、プログラム解析情報に対するプログラムパターン
・部品による部分と追加コーディングの部分の識別は、
該当パターンに対応したプログラムパターン・部品によ
る部品と追加コーディングの部分の識別情報を入力し、
その情報を用いて、行ない、該識別により、プログラム
パターン・部品の使用の有無の出力、追加コーディング
部分・プログラムパターン・部品部分の、行数、実行文
数、又はそれらの比率等のサイズ情報の出力、あるいは
、検出された追加コーディング部分内のプログラムに対
する保守性の評価・出力を行なうことを特徴とする請求
項1又は2記載のソフトウェア評価方法。 14、プログラムパターン・部品による部分・追加コー
ディングの部分のサイズに関する情報の取得、あるいは
追加コーディング部分の保守性の評価は該当パターン・
部品に関する保守性の指標となる計測情報を入力し、そ
の情報を用いて、算出することを特徴とする請求項12
項記載のソフトウェア評価方法。 15、プログラムの解析時に、各内部手続きの開始情報
及び、内部手続き間の呼出し文を検出することにより、
プログラム内の内部構造情報を作成し、解析情報による
プログラムの保守性の指標となるプログラム記述の検出
、その情報の計測、及びその計測情報に基づく評価点の
算出を、各内部手続き単位に行ない、前記の内部構造情
報に基づいてプログラム内構造図情報を作成し、その上
に各内部手続きごとの評価を色や形状で区別してビジュ
アルに出力することを特徴とする請求項1又は2記載の
ソフトウェア評価方法。 16、指定されたプログラム群を構成する各プログラム
に対し、プログラム解析、保守性情報の計測、評価点の
算出を行なうと共に、各プログラム内の他プログラム呼
び出し文によりプログラム間の呼び出し関係を検出し、
該呼び出し関係情報によりプログラム間の関連図情報を
作成し、その上に各プログラムごとの評価点を色や形状
で区別してビジュアルに出力することを特徴とする請求
項1又は2記載のソフトウェア評価方法。 17、少なくとも1つのプログラムを解析して、その解
析情報により、プログラム内の保守性に問題のあるプロ
グラム記述を検出し、該プログラム記述の解析情報の少
なくともいずれかを前記問題を解決すべく定められた方
法で変更し、その変更した解析情報からプログラムを再
生成して出力することを特徴とするソフトウェア変換方
法。 18、検出プログラム記述情報は、END−IFが使用
されていないIF文、THEN、ELSEが共に使用さ
れていないIF文、の少なくともいずれかを含み、該I
F文に対し、使用されていないEND−IF、THEN
、ELSEの少なくともいずれかの記述情報を解析情報
に挿入して解析情報を変更し、その解析情報から該当箇
所を変更したプログラムを再生成して出力することを特
徴とする請求項17記載のソフトウェア変換方法。 19、プログラム記述検出情報は、保守性に問題がある
と定めた字句区切り情報の少なくともいずれかを含み、
該字句区切り情報を解析情報から削除して、その解析情
報から該当箇所を変更したプログラムを再生成して出力
することを特徴とする請求項17記載のソフトウェア変
換方法。 20、プログラム記述検出情報は、同一行に複数の文を
持つ箇所、IF文又はPERFORM文の内に含まれる
字下げ対象文の内で、字下げを行なつていない文、ある
いは、字下げ対象範囲から出た文の内で字さげから戻し
ていない文のプログラムの記述位置に関する保守性に問
題のあると定めたプログラム記述を含み、該解析情報に
たいし、同一行に複数の文を持つ箇所の2番目以後の文
の別行化、字下げ対象文の内で、字下げを行なつていな
い文の先頭カラム位置の字下げカラム位置への変更、字
下げ対象範囲から出た文の内で字さげから戻していない
文の先頭カラム位置の字下げ戻りのカラム位置への変更
等の少なくとも何れかの変更を行なつて、この変更され
た解析情報からプログラムを再生成して出力することを
特徴とする請求項17記載のソフトウェア変換方法。 21、自動変更したプログラムに対し、保守性の指標と
なる情報の検出、該情報の計測、該計測情報と定められ
た評価基準による、評価点の算出により、該評価点を図
表形式で出力し、請求項1の方法によるプログラム内の
保守性に問題のあるプログラム記述情報を検出し、関連
づけて出力することを特徴とする請求項17〜20のい
ずれか記載のソフトウェア変換方法。 22、複数のプログラムに対し、プログラム解析、保守
性情報の計測、評価点の算出を行なつて保守性の評価情
報を得、その評価情報を人やグループ別、あるいは時系
列毎に集計して、比較出力することを特徴とする請求項
2記載のソフトウェア評価方法。 23、少なくとも1つのソースプログラムを解析して、
その解析情報により、プログラム内の保守性に問題のあ
る記述情報を検出し、ソースプログラム中の、上記の問
題のある記述情報を含む行を、保守性に問題のある原因
を示した情報と対応づけて出力することを特徴とするソ
フトウェア評価方法。 24、少なくとも1つのソースプログラムを解析して、
その解析情報により、プログラム内の保守性に問題のあ
る記述情報を検出し、該ソースプログラムを、その中の
、上記問題のある記述情報を含む行に対し、保守性に問
題のある原因を示した情報を付加し、出力することを特
徴とするソフトウェア評価方法。
[Claims] 1. Analyze at least one program, use the analysis information to detect descriptive information in the program that has a maintainability problem, and associate it with information indicating the cause of the maintainability problem. A software evaluation method characterized by outputting the following information. 2. Measure the presence or number of descriptive information that has maintainability problems or that is an index of maintainability in the detected program, and based on the measured information, according to established evaluation criteria, 2. The software evaluation method according to claim 1, further comprising calculating evaluation points and outputting the evaluation points in a chart format. 3. The user sets or changes the program description information type or evaluation criteria to be detected and measured, and based on this program description information type information, the description information with maintainability problems and its cause information are output. 3. The software evaluation method according to claim 1, further comprising: outputting the measurement information, or obtaining an evaluation result using the measurement information and the evaluation criteria and outputting it in a chart format. 4. GOTO statement or ALTER in the source program
Detects program description information that includes information about statements that have maintainability problems or that violate the standard, and based on this program description information, identifies the program description information that is determined to be problematic. Software evaluation according to claim 1 or 2, characterized in that the cause information is output, or the descriptive information is measured and output, or the evaluation result is obtained using this measurement information and the evaluation criteria and output in a chart format. Method. 5. Program description information that includes syntax that determines that there is a problem with maintainability of IF statements in the source program that do not have END-IF added at the end, or IF statements that do not include both THEN and ELSE. Detected and based on this program description information, output the description information determined to be problematic and its cause information, or measure and output the description information, or obtain evaluation results using this measurement information and the above evaluation criteria, 3. The software evaluation method according to claim 1, wherein the software evaluation method is output in a chart format. 6. Detects program description information in the source program that includes executable statements that are determined to have maintainability problems, such as GOTO statements or PERFORM statements whose destination is above the program, and based on this program description information, determines maintainability. At least one of the following: output of descriptive information that determines that there is a problem and its cause information, measurement and output of the descriptive information, or obtaining evaluation results using this measurement information and the above evaluation criteria and outputting them in chart format. The software evaluation method according to claim 1 or 2, characterized in that: 7. Detect program description information that includes lexical delimiter information that determines that "," and ";" have maintainability problems in the source program, and use the method described above to improve maintainability based on this program description information. Output of descriptive information that determines that there is a problem and its cause information, or measurement and output of the descriptive information,
3. The software evaluation method according to claim 1, further comprising the step of obtaining an evaluation result using this measurement information and the evaluation criteria and outputting it in a chart format. 8. Places in the source program that have multiple statements on the same line, sentences that are not indented among the target sentences,
Alternatively, detect program description information that includes a statement that determines that there is a maintainability problem regarding the program description position of a statement that has not been returned from the indentation range within the statement that has come out of the indentation target range, and Based on the above, output descriptive information that determines that there is a maintainability problem and its cause information, or measure and output the descriptive information, or obtain evaluation results using this measurement information and the above evaluation criteria and output in chart format. The software evaluation method according to claim 1 or 2, characterized by: 9. Measure the program description information including program internal procedure size information such as the number of lines or sentences of program internal procedures, or the average value or maximum value of at least one of them, in the source program, and add this program description information to the program description information. Based on the above method, output descriptive information that determines that there is a maintainability problem and its cause information, or measure and output the descriptive information, or obtain historical value results using this measured information and the above evaluation criteria, 3. The software evaluation method according to claim 1, wherein at least one of the following is output in a chart format. 10. Measure the program description information including information on the number or ratio of comment lines in the source program, and based on this program description information, use the method described above to determine the description information that determines that there is a maintainability problem and its cause. 3. The software evaluation method according to claim 1, further comprising outputting the information, measuring and outputting the descriptive information, or obtaining an evaluation result using the measured information and the evaluation criteria and outputting it in a chart format. 11. Measure the program description information including information about the overall size of the program, such as the number of program lines in the source program, the number of procedure division lines, the number of statements in the program, or the number of executable statements in the procedure division, and based on this program description information. , by using the above method, output the descriptive information that determines that there is a maintainability problem and its cause information, or measure and output the descriptive information, or obtain evaluation results using this measurement information and the above evaluation criteria, and output it in chart format. 3. The software evaluation method according to claim 1, wherein the software evaluation method is output as follows. 12. Analyze at least one program and comment on whether or not a program pattern/component, which is a semi-completed program created in advance, is used in the program, or identify a part based on a program pattern/part and a part with additional coding. This is done based on the identification information within, and outputs whether or not program patterns and parts are used, or additional coding parts, program patterns, and parts.
3. The software evaluation method according to claim 1, further comprising outputting size information such as the number of lines, the number of executable statements, or a ratio thereof. 13. Identification of program pattern/component parts and additional coding parts for program analysis information is as follows:
Input the identification information of the parts and additional coding parts according to the program pattern/parts that correspond to the corresponding pattern,
Using that information, the process outputs whether the program pattern/component is used or not, and size information such as the number of lines, the number of executable statements, or their ratio of the additional coding part/program pattern/part part. 3. The software evaluation method according to claim 1, further comprising the step of outputting, or evaluating and outputting the maintainability of the program in the detected additional coding portion. 14. Acquisition of information regarding the size of the program pattern/component part/additional coding part, or evaluation of the maintainability of the additional coding part is based on the corresponding pattern/part.
Claim 12 characterized in that measurement information serving as an index of maintainability regarding the part is input and the calculation is performed using that information.
Software evaluation method described in section. 15. When analyzing a program, by detecting the start information of each internal procedure and the call statements between internal procedures,
Create internal structure information within the program, detect program descriptions that are indicators of program maintainability using analysis information, measure that information, and calculate evaluation points based on the measured information for each internal procedure unit, The software according to claim 1 or 2, wherein the program internal structure diagram information is created based on the internal structure information, and the evaluation for each internal procedure is visually outputted by distinguishing it by color or shape. Evaluation method. 16. Perform program analysis, measure maintainability information, and calculate evaluation points for each program constituting the specified program group, and detect call relationships between programs based on other program call statements in each program;
3. The software evaluation method according to claim 1, wherein relation diagram information between programs is created based on the call relationship information, and evaluation points for each program are distinguished by color or shape and output visually. . 17. Analyze at least one program, use the analysis information to detect a program description in the program that has a maintainability problem, and use at least one of the analysis information of the program description to be determined in order to solve the problem. A software conversion method characterized in that the program is changed using a modified method, and a program is regenerated and output from the changed analysis information. 18. The detection program description information includes at least one of the following: an IF statement in which END-IF is not used, and an IF statement in which THEN and ELSE are not used together;
For F statements, unused END-IF, THEN
, ELSE is inserted into the analysis information to change the analysis information, and the software regenerates and outputs a program with the relevant portion changed from the analysis information. Conversion method. 19. The program description detection information includes at least one of the lexical delimiter information determined to have a maintainability problem,
18. The software conversion method according to claim 17, further comprising deleting the lexical delimiter information from the analysis information, and regenerating and outputting a program with the relevant portion changed from the analysis information. 20. Program description detection information is for locations with multiple statements on the same line, statements that are not indented among the indented statements included in an IF statement or PERFORM statement, or statements that are indented. Contains a program description that has been determined to have a maintainability problem regarding the program description position of a statement that has come out of the range but has not been returned from the indentation, and has multiple statements on the same line for the analysis information. Converting sentences after the second in a passage to separate lines, changing the first column position of a sentence that is not indented among the sentences to be indented to the indentation column position, and changing the position of a sentence that is out of the indentation target range. Make at least one of the changes, such as changing the first column position of the sentence that has not been returned from indentation to the column position for returning from indentation, and regenerate and output the program from this changed analysis information. 18. The software conversion method according to claim 17. 21. For automatically modified programs, detect information that is an index of maintainability, measure this information, calculate evaluation points based on the measured information and established evaluation criteria, and output the evaluation points in a chart format. 21. The software conversion method according to claim 17, wherein program description information having problems in maintainability in a program is detected by the method according to claim 1, and outputted in association with the program description information. 22. Perform program analysis, measure maintainability information, and calculate evaluation points for multiple programs to obtain maintainability evaluation information, and aggregate the evaluation information by person, group, or time series. 3. The software evaluation method according to claim 2, wherein a comparison output is performed. 23. Analyze at least one source program,
Based on the analysis information, descriptive information with maintainability problems in the program is detected, and lines containing the problematic descriptive information in the source program are matched with information indicating the cause of maintainability problems. A software evaluation method that is characterized by outputting the following information. 24. Analyzing at least one source program,
Based on the analysis information, descriptive information that has maintainability problems in the program is detected, and the cause of the maintainability problem is indicated for the lines in the source program that include the problematic descriptive information. A software evaluation method characterized by adding and outputting information.
JP2088221A 1990-04-04 1990-04-04 Software evaluating method Pending JPH03288226A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2088221A JPH03288226A (en) 1990-04-04 1990-04-04 Software evaluating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2088221A JPH03288226A (en) 1990-04-04 1990-04-04 Software evaluating method

Publications (1)

Publication Number Publication Date
JPH03288226A true JPH03288226A (en) 1991-12-18

Family

ID=13936826

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2088221A Pending JPH03288226A (en) 1990-04-04 1990-04-04 Software evaluating method

Country Status (1)

Country Link
JP (1) JPH03288226A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07141171A (en) * 1993-06-21 1995-06-02 Nec Corp Device for evaluating software quality
KR20000064184A (en) * 2000-08-28 2000-11-06 김규일 Beta-testing system for beta-version program on the internet
JP2006018735A (en) * 2004-07-05 2006-01-19 Hitachi Software Eng Co Ltd Coding standard observance situation monitoring system
JP2007122190A (en) * 2005-10-25 2007-05-17 Ns Solutions Corp Information processing device, information processing method, and program
JP2008020972A (en) * 2006-07-11 2008-01-31 Hitachi Ltd Software analysis system
JP2008250914A (en) * 2007-03-30 2008-10-16 Canon Software Inc Program correcting device, method and program
JP2017058733A (en) * 2015-09-14 2017-03-23 株式会社エクサ Cobol source code converting program

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07141171A (en) * 1993-06-21 1995-06-02 Nec Corp Device for evaluating software quality
KR20000064184A (en) * 2000-08-28 2000-11-06 김규일 Beta-testing system for beta-version program on the internet
JP2006018735A (en) * 2004-07-05 2006-01-19 Hitachi Software Eng Co Ltd Coding standard observance situation monitoring system
JP2007122190A (en) * 2005-10-25 2007-05-17 Ns Solutions Corp Information processing device, information processing method, and program
JP2008020972A (en) * 2006-07-11 2008-01-31 Hitachi Ltd Software analysis system
JP2008250914A (en) * 2007-03-30 2008-10-16 Canon Software Inc Program correcting device, method and program
JP2017058733A (en) * 2015-09-14 2017-03-23 株式会社エクサ Cobol source code converting program

Similar Documents

Publication Publication Date Title
Winograd Linguistics and the computer analysis of tonal harmony
US8046364B2 (en) Computer aided validation of patent disclosures
JP2013522790A (en) Code inspection execution system for ABAP source code
CN112163553B (en) Material price accounting method, device, storage medium and computer equipment
CN108665141B (en) Method for automatically extracting emergency response process model from emergency plan
CN113987199A (en) BIM intelligent image examination method, system and medium with standard automatic interpretation
JPH03288226A (en) Software evaluating method
CN110347898A (en) A kind of the response generation method and system of network public-opinion monitoring
KR100284580B1 (en) Web document automatic generating device and method
CN113360603A (en) Contract similarity and compliance detection method and device
CN112613176A (en) Slow SQL statement prediction method and system
US11768756B2 (en) Method for enabling verification of legitimacy of an asynchronous algorithm generated when a logically connected program is executed
US20090187889A1 (en) Method and system for inconsistency resolution with cycle detection in a model-driven software environment
CN116360794A (en) Database language analysis method, device, computer equipment and storage medium
CN107741905B (en) Test case, analytic model thereof, execution method, storage medium and processor
CN112925874B (en) Similar code searching method and system based on case marks
Popescu-Belis How corpora with annotated coreference links improve reference resolution
CN115080448A (en) Method and device for automatically detecting inaccessible path of software code
CN114035783A (en) Software code knowledge graph construction method and tool
Cybulski Patterns in software requirements reuse
CN109685453B (en) Method for intelligently identifying effective paths of workflow
CN113515443A (en) Multi-language automatic checking method, device, computer equipment and storage medium
JP2003280901A (en) Program for supporting estimation evaluation and system for supporting estimation evaluation
CN116860227B (en) Data development system and method based on big data ETL script arrangement
CN116126790B (en) Railway engineering archive archiving method and device, electronic equipment and storage medium