JPS62231335A - Coding expert system - Google Patents

Coding expert system

Info

Publication number
JPS62231335A
JPS62231335A JP61074057A JP7405786A JPS62231335A JP S62231335 A JPS62231335 A JP S62231335A JP 61074057 A JP61074057 A JP 61074057A JP 7405786 A JP7405786 A JP 7405786A JP S62231335 A JPS62231335 A JP S62231335A
Authority
JP
Japan
Prior art keywords
coding
program
knowledge
knowledge base
processing
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
JP61074057A
Other languages
Japanese (ja)
Inventor
Atsushi Takamura
淳 高村
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP61074057A priority Critical patent/JPS62231335A/en
Publication of JPS62231335A publication Critical patent/JPS62231335A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve coding supporting effect by providing a knowledge base to store the knowledge necessary to debug and modify a program and detecting the coding based upon the knowledge base. CONSTITUTION:A program 2, which comes to be a processing object, is inputted from an input means to a reasoning mechanism 3. The reasoning mechanism 3 reasons whether or not the coding, which comes to be the object of a processing purpose, such as the bug detection and the remodelling is present in the light of a knowledge base 1, in which the prescribed knowledge is stored, to the program 2. When such a coding is present, the advice of the correcting method or the actual correcting example is outputted to a detected coding part. Thus, the coding supporting effect can be increased.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、ソフトウェアの開発を支援するエキスパート
・システムに関し、特に、品質、性能上良くないコーデ
ィングを検出して修正方法を教えるといった質の高いソ
フトウェアの生産を支援し、且つプログラマに良いコー
ディングを行なうためのノウハウを教育する機能、及び
ソフトウェア/ハードウェアの設定変更に応じて改造が
必要となる箇所を自動検出し修正方法を教えるといった
改造作業を支援する機能のうち少なくとも一方の機能を
備えた知識ベースシステムに関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to an expert system that supports the development of software, and in particular, to an expert system that supports the development of software. A function that supports software production and educates programmers on the know-how for good coding, and modification work that automatically detects parts that require modification in response to changes in software/hardware settings and teaches how to modify them. The present invention relates to a knowledge base system that includes at least one of the functions that support.

〔従来の技術〕[Conventional technology]

従来、実用的なプログラムの開発は、人手によって行な
われてきた。そのため、バグが発生したり、同じ処理を
行なうのにも技能等の観点から、コーディングに上手下
手が存在した。コーディングミスのチェックに関しては
、コンパイラ等でシンタンクスエラー、簡単で一般的な
セマンティソクなエラーのチェックは行なっているが、
内容に関する高度なチェックは行なっていない。
Conventionally, practical program development has been done manually. As a result, bugs occurred, and even when performing the same processing, there were differences in coding due to skill and other factors. Regarding checking for coding mistakes, we check for syntax errors and simple general semantic errors using compilers, etc.
No advanced checks have been performed on the content.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

ある特定分野、例えばオペレーティングシステムのある
モジュールをコーディングするには、そのソフトウェア
固有の様々なノウハウが存在するが、そのような特定領
域の知識を利用してエラーチェックを行なうといったコ
ーディング支援は、コンパイラ等の既存のシステムでは
できない。また、このようなある分野固有のノウハウが
プログラム開発者に備わるには長い年月と失敗による経
験を要する。その結果、プログラム開発完了後、改造、
保守時にその分野で間違い易い同じコーディングミスが
何度も起きるといった現象が発生する。
To code a certain field, for example, a certain module of an operating system, there is a variety of know-how specific to that software, but coding support such as error checking using knowledge in such a specific field is not possible with compilers, etc. This is not possible with existing systems. Furthermore, it takes many years and experience through failure for program developers to acquire such know-how specific to a certain field. As a result, after the program development was completed, modifications,
During maintenance, a phenomenon occurs in which the same coding mistakes that are easy to make in that field occur over and over again.

本発明はこのような事情に鑑ミて為されたものであり、
コーディング支援効果の高いコーディング・エキスパー
ト・システムを提供することにある。
The present invention has been made in view of these circumstances,
The objective is to provide a coding expert system that provides highly effective coding support.

〔問題点を解決するための手段〕[Means for solving problems]

本発明のコーディング・エキスパート・システムは、プ
ログラムのデバッグ及び改造のうち少なくとも一方に必
要な知識を知識ベースとして記憶する手段と、 処理対象となるプログラムを入力する入力手段と、 前記知識ベースに照らして、前記人力手段により入力さ
れたプログラム内に、処理目的の対象となるコーディン
グが存在するかどうかを推論し、その推論結果により検
出されたコーディング部分に対して、修正方法のアドバ
イス及び直接修正した内容のうち少なくとも一方を出力
する推論手段とから構成される。
The coding expert system of the present invention comprises means for storing knowledge necessary for at least one of debugging and modifying a program as a knowledge base, an input means for inputting a program to be processed, and a method based on the knowledge base. , Infer whether or not there is coding targeted for processing purposes in the program input by the human means, and provide advice on how to correct the coding part detected as a result of the inference, and the content directly corrected. and an inference means for outputting at least one of the two.

〔作用〕[Effect]

入力手段から入力された処理対象となるプログラムに対
し、推論手段は、所定の知識が格納された知識ベースに
照らしてバグ検出、改造といった処理目的の対象となる
コーディングが存在するかどうか推論し、そのようなコ
ーディングが存在する場合、検出されたコーディング部
分に対して修正方法のアドバイス及び直接修正した内容
のうち少なくとも一方を出力する。
The inference means infers whether or not there is coding to be processed for a processing purpose such as bug detection or modification with respect to the program to be processed inputted from the input means in reference to a knowledge base in which predetermined knowledge is stored; If such coding exists, at least one of advice on a correction method and directly corrected content is output for the detected coding portion.

〔実施例〕〔Example〕

次に本発明の実施例について図面を参照して説明する。 Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例の構成説明図であり、本実施
例のコーディング・エキスパート・システムは、コーデ
ィングに関する様々な知識、すなわちチェックすべきコ
ーディングミスのパターン。
FIG. 1 is an explanatory diagram of the configuration of an embodiment of the present invention, and the coding expert system of this embodiment has various knowledge regarding coding, that is, patterns of coding errors to be checked.

実行性能を向上させるためのコーディングノウハウ、使
用変更に伴う改造を支援するための使用変更内容の知識
などを入力する知識ベース1と、処理の対象とするプロ
グラム2と、プログラム2内にバグ検出、改造等の目的
の対象となるコーディングが存在するかどうかを推論し
、出力4を出す推論機構3とから構成されている。上記
出力4としては、本実施例の場合、検出されたコーディ
ング、説明、アドバイス又は修正コーディングなどを含
んでいる。
A knowledge base 1 that inputs coding know-how to improve execution performance, knowledge of usage changes to support modifications due to usage changes, etc., a program 2 to be processed, and a program that detects bugs in the program 2. It consists of an inference mechanism 3 that infers whether or not coding exists for the purpose of modification, etc., and outputs an output 4. In this embodiment, the output 4 includes detected coding, explanation, advice, or corrected coding.

前記知識ベース1には、本実施例の場合次のような知識
が格納される。なお、これらの知識は、一般的なものか
ら特定領域固有のものまで、適用範囲毎に分類されてい
る。
In this embodiment, the knowledge base 1 stores the following knowledge. Note that this knowledge is classified by scope of application, from general knowledge to knowledge specific to specific areas.

・チェックすべきコーディングミスのパターン間違い易
いコーディング、発生頻度は低くとも致命的なバグとな
るもの等、検出すべきコーディングミスのパターン。
- Patterns of coding mistakes that should be checked.Patterns of coding mistakes that should be detected, such as coding that is easy to make mistakes, and those that occur infrequently but can lead to fatal bugs.

・良いコーディングのノウハウ 性能、保守のし易さ等の観点からの悪いコーディング、
良いコーディングのパターン。
・Good coding know-how Bad coding from the perspective of performance, ease of maintenance, etc.
Good coding patterns.

・仕様変更の内容 ハードウェア/ソフトウェアの仕様変更に伴う改造を支
援するために、どのコーディングをどのように変更すれ
ばよいかという知識。
・Contents of specification changes Knowledge of which coding should be changed and how to support modification due to changes in hardware/software specifications.

・その他の知識 対象領域に関する知識、コーディングの一般的なノウハ
ウや知識等。
・Knowledge of other knowledge subject areas, general know-how and knowledge of coding, etc.

これらの知識は、フレーム、プロダクションルール、ス
クリプト等の知識表現形式によって表現される。前述の
その他の知識のような一般的で静的な知識はフレームと
して格納される。プロダクションルールも内部ではフレ
ーム形式で格納される。
This knowledge is expressed in knowledge representation formats such as frames, production rules, and scripts. General and static knowledge, such as the other knowledge mentioned above, is stored as frames. Production rules are also stored internally in frame format.

スクリプトは、検出すべき処理のパターン、手順を記述
するのに使用される。
Scripts are used to describe processing patterns and procedures to be detected.

また、第1図の処理対象プログラム2は、コーディング
・エキスパート・システムにより解析を行なうプログラ
ムであり、このプログラムは、検出パターンとのマツチ
ング等の処理が行ない易いように予めリスト構造のデー
タ形式に変換されている。
In addition, the processing target program 2 in Figure 1 is a program that performs analysis using the coding expert system, and this program is converted into a list-structured data format in advance to facilitate processing such as matching with detected patterns. has been done.

推論機構3は、プロダクションルールを用いた演鐸推論
と、インへりタンス、デフォルト、デモン等のフレーム
による推論と、スクリプトを用いたプログラムの処理内
容の理解、マツチングによる推論を行なう。
The inference mechanism 3 performs inference using production rules, inference using frames such as inheritance, default, and demon, understanding the processing contents of a program using a script, and inference using matching.

前記結果としての出力4は、誤り検出、改造支援等の目
的に応じて検出されたコーディング、何故その部分が検
出されたかの説明、修正方法に関するアドバイス又は具
体的な修正コーディングから構成される。
The resulting output 4 is composed of detected coding for purposes such as error detection and modification support, an explanation of why the part was detected, advice on a correction method, or specific correction coding.

第2図は本実施例の処理の主要部分を示す流れ図であり
、以下、各図を参照して本実施例の動作を説明する。
FIG. 2 is a flowchart showing the main parts of the processing of this embodiment, and the operation of this embodiment will be explained below with reference to each figure.

第2図に示すように、先ずフロー10で処理の対象とな
るプログラムの一部分が推論機構3に入力される。推論
機構3は、フロー20に示すように、入力されたプログ
ラム中に、知識ベース内で定義された問題となるコーデ
ィングが存在するかどうかを検出する。具体的な推論方
法としては、例えば入力された命令語をトリガとして、
プロダクションルールにより前向き推論を行ない、問題
となるコーディングの仮説をまず導きだす。仮説がたっ
た場合は、後ろ向き推論あるいはスクリプトによる処理
パターンとのマツチングにより仮説を検証する。仮説の
検証には、フレームにより記述された静的な事実を使う
こともあれば、フレームのデモンにより手続きが起動さ
れて必要な事実のチェックを行なうこともある。
As shown in FIG. 2, first, in flow 10, a part of the program to be processed is input to the inference mechanism 3. As shown in flow 20, the inference mechanism 3 detects whether problematic coding defined in the knowledge base exists in the input program. As a specific inference method, for example, using an input command word as a trigger,
We perform forward inference using production rules and first derive the coding hypothesis that is the problem. When a hypothesis is established, it is verified by backward inference or by matching it with processing patterns based on scripts. Hypotheses may be tested using static facts described by frames, or procedures may be invoked by frame demons to perform the necessary fact checks.

仮説が検証された場合、フロー30に示すように、検出
されたコーディング、何故そのコーディングが検出され
たかの説明、どのように修正すればよいかのアドバイス
或いは実際の修正例が出力される。そして、フロー40
の判断分岐処理により、全ての入力プログラム部分につ
いてチェックが終了すれば、処理は完了する。
If the hypothesis is verified, as shown in flow 30, the detected coding, an explanation of why the coding was detected, and advice on how to correct it or an example of the actual correction are output. And flow 40
When all the input program parts are checked by the decision branching process, the process is completed.

以上の実施例は、プログラムのデバッグと改造の双方に
適用可能に構成したが、本発明はそのうちの少なくとも
一方を処理目的とするシステムに適用可能である。
Although the embodiments described above are configured to be applicable to both debugging and modification of programs, the present invention is applicable to systems whose processing purpose is at least one of them.

第3図は本発明を実施する情報処理装置の一例を示すブ
ロック図であり、処理対象となるプログラム及び推論等
に必要な知識ベースは補助記憶装置50に予め格納され
ており、処理実行時に主記憶装置51にロードされる。
FIG. 3 is a block diagram showing an example of an information processing device implementing the present invention, in which a program to be processed and a knowledge base necessary for inference, etc. are stored in advance in the auxiliary storage device 50, and the main It is loaded into the storage device 51.

中央処理装置52は前述したように主記憶装置51上の
処理対象プログラムを順次読み取って推論を行ない、そ
の結果としての前記出力4は入出力インタフェース53
を介して出力装置54に出力される。操作者は、出力装
置54の出力内容を参照し、処理対象プログラムの修正
変更等に必要な操作を行なうことが可能である。なお、
入力装置55は、システムの起動、処理項目の選択、シ
ステムからの質問に対する応答などの際に使用される。
As described above, the central processing unit 52 sequentially reads the processing target programs on the main storage device 51 and performs inference, and the output 4 as a result is sent to the input/output interface 53.
It is output to the output device 54 via. The operator can refer to the output contents of the output device 54 and perform operations necessary to modify or change the program to be processed. In addition,
The input device 55 is used when starting the system, selecting processing items, responding to questions from the system, and the like.

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

以上説明したように、本発明によれば、プログラムの誤
りを検出してソフレシェアの品質を向上させ、且つプロ
グラマに実行性能、保守効率の観点からの良いコーディ
ングノウハウを教えることができるという効果がある。
As explained above, according to the present invention, it is possible to improve the quality of Softreshare by detecting program errors, and to teach programmers good coding know-how from the viewpoint of execution performance and maintenance efficiency. .

即ち、プログラミング言語等に関する一般的なノウハウ
を知識ベースに入力すれば、一般的なプログラム開発時
に有効となる。また、オペレーティングシステム等大規
模なソフトウェアを開発して保守、改造を続ける場合、
そのソフトウェア固有のコーディング規則。
That is, inputting general know-how regarding programming languages and the like into the knowledge base will be effective when developing general programs. In addition, when developing, maintaining, and modifying large-scale software such as operating systems,
Coding rules specific to that software.

ノウハウが多く存在するが、それらを知識ベースに入力
してバグの検出、ノウハウの教育を行なうこともできる
。更に、仕様変更等の内容を入力すれば、仕様変更に伴
う改造作業の効率を向上させることができる。このよう
に、本発明をソフトウェア開発作業に適用することによ
り、ソフトウェアの品質、生産性、実行効率を向上さセ
ることができ、またコーディングテクニックを教えるこ
とができるという効果がある。
There is a lot of know-how, and it is also possible to input it into the knowledge base to detect bugs and provide know-how education. Furthermore, by inputting the details of changes in specifications, etc., it is possible to improve the efficiency of modification work associated with changes in specifications. As described above, by applying the present invention to software development work, the quality, productivity, and execution efficiency of software can be improved, and coding techniques can be taught.

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

第1図は本発明の一実施例の構成説明図、第2図は本発
明の実施例における処理の要部を示す流れ図および、 第3図は本発明を実施する情報処理装置の一例を示すブ
ロック図である。 図において、1・・・知識ペース、2・・・処理対象と
なるプログラム、3・・・推論機構、4・・・検出コー
ディング、説明、アドバイス又は修正コーディングを含
む出力。
FIG. 1 is a configuration explanatory diagram of an embodiment of the present invention, FIG. 2 is a flowchart showing main parts of processing in the embodiment of the present invention, and FIG. 3 is an example of an information processing device implementing the present invention. It is a block diagram. In the figure, 1... Knowledge pace, 2... Program to be processed, 3... Reasoning mechanism, 4... Output including detection coding, explanation, advice, or correction coding.

Claims (1)

【特許請求の範囲】 プログラムのデバッグ及び改造のうち少なくとも一方に
必要な知識を知識ベースとして記憶する手段と、 処理対象となるプログラムを入力する入力手段と、 前記知識ベースに照らして、前記入力手段により入力さ
れたプログラム内に、処理目的の対象となるコーディン
グが存在するかどうかを推論し、その推論結果により検
出されたコーディング部分に対して、修正方法のアドバ
イス及び直接修正した内容のうち少なくとも一方を出力
する推論手段とから構成されたコーディング・エキスパ
ート・システム。
[Scope of Claims] Means for storing knowledge necessary for at least one of program debugging and modification as a knowledge base; input means for inputting a program to be processed; and said input means in light of said knowledge base. Infers whether or not there is coding targeted for processing purposes in the program input by A coding expert system consisting of an inference means that outputs.
JP61074057A 1986-03-31 1986-03-31 Coding expert system Pending JPS62231335A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61074057A JPS62231335A (en) 1986-03-31 1986-03-31 Coding expert system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61074057A JPS62231335A (en) 1986-03-31 1986-03-31 Coding expert system

Publications (1)

Publication Number Publication Date
JPS62231335A true JPS62231335A (en) 1987-10-09

Family

ID=13536178

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61074057A Pending JPS62231335A (en) 1986-03-31 1986-03-31 Coding expert system

Country Status (1)

Country Link
JP (1) JPS62231335A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1185496A (en) * 1997-09-03 1999-03-30 Fujitsu Ltd Support device for production of object-oriented program
CN116645116A (en) * 2023-06-12 2023-08-25 碳融汇(北京)技术有限公司 Painting and calligraphy collection traceability system based on block chain

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1185496A (en) * 1997-09-03 1999-03-30 Fujitsu Ltd Support device for production of object-oriented program
CN116645116A (en) * 2023-06-12 2023-08-25 碳融汇(北京)技术有限公司 Painting and calligraphy collection traceability system based on block chain
CN116645116B (en) * 2023-06-12 2024-03-15 知晓(北京)通信科技有限公司 Painting and calligraphy collection traceability system based on block chain

Similar Documents

Publication Publication Date Title
US8572572B2 (en) Dynamic source code analyzer
US7080360B2 (en) Breakpoint safety net
JPH0748182B2 (en) Program error detection method
Haque et al. The potential use of ChatGPT for debugging and bug fixing
CN110928760B (en) Unit test method and device in embedded system
JPS62231335A (en) Coding expert system
CN113656298A (en) Automatic test case generation and test system based on interface description and use method thereof
CN112860548A (en) Code automatic detection method and device, electronic equipment and storage medium
JPS6312027A (en) Job control language expert system
JPS5922140A (en) Interactive compiling system
JPH02275539A (en) Debugging system
JPH02266440A (en) Dynamic debugging expert system
JPH07295858A (en) Debug processing method for image processor and parallel computer
US20240037012A1 (en) Computer-implemented method for verifying a software component of an automated driving function
JPH04155540A (en) Program correcting system by interactive debugger
CN117369818A (en) Continuous integration method and system of software and computer readable storage medium
JPH05197539A (en) Matching system for program source code
JPH0468446A (en) Debugging supporting device
JPS63641A (en) Inputting system for instruction
JPH03263129A (en) Compiler/debugger method
CN115756669A (en) Function call path retrieval method and device, computing device and storage medium
CN117573520A (en) Program abnormality detection method, device, equipment and storage medium
JPH103383A (en) Patch generating system
JPH06337780A (en) Device and method for patch correction of load module
JPH04358232A (en) Function testing method for information processor