JP3141817B2 - How to check the function interface - Google Patents

How to check the function interface

Info

Publication number
JP3141817B2
JP3141817B2 JP09167089A JP16708997A JP3141817B2 JP 3141817 B2 JP3141817 B2 JP 3141817B2 JP 09167089 A JP09167089 A JP 09167089A JP 16708997 A JP16708997 A JP 16708997A JP 3141817 B2 JP3141817 B2 JP 3141817B2
Authority
JP
Japan
Prior art keywords
function
parameter
key information
key
name
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.)
Expired - Fee Related
Application number
JP09167089A
Other languages
Japanese (ja)
Other versions
JPH1115694A (en
Inventor
田丸 福島
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 JP09167089A priority Critical patent/JP3141817B2/en
Publication of JPH1115694A publication Critical patent/JPH1115694A/en
Application granted granted Critical
Publication of JP3141817B2 publication Critical patent/JP3141817B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)
  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、本発明はプログラ
ム論理の合理性チェックに関し、特にリンカー処理が行
われない各部分ロードモジュール間のプログラム関数イ
ンターフェースの合理性をチェックする関数インタフェ
ースのチェック方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program logic rationality check, and more particularly to a function interface check method for checking the rationality of a program function interface between partial load modules not subjected to linker processing. .

【0002】[0002]

【従来の技術】従来は、異なる部分ロードモジュール上
に存在する関数間の関数コール時の関数名使用の合理性
のチェックは、リンカーで行うことが出来なかった。こ
ため、コール関数へのアドレスリンクの作成は人手に
より作成せざるを得ず、この場合、アドレスリンクの設
定に誤りが発生するという問題があった。この誤りを検
出するために、ターゲットマシン上で実際に検査対象の
プログラムを走行させ、矛盾により生した異常現象か
ら、逆に関数名使用の誤りを検出すると言う方法が取ら
れていた。また、関数コール時の関数パラメータ名の使
用についても、その合理性チェックが行われていなかっ
たため、ターゲットマシン上で実際に検査対象のプログ
ラムを走行させ、矛盾により生した異常現象から、逆に
関数パラメータ名使用の誤りを検出すると言う方法が取
られていた。
2. Description of the Related Art Conventionally, rationality of the check of the function name used at the time of function calls between functions that exist on a different part load module, did not can be performed by a linker. This
Because of the creation of the address link to the call function is to hand
In this case, it is necessary to create an address link.
There was a problem that an error occurred in certain cases. Check for this error
In order to output the program, a method has been adopted in which a program to be inspected is actually run on a target machine, and an error in use of a function name is detected from an abnormal phenomenon caused by contradiction. Also, use of function parameter names when calling functions
Rationality check has not been conducted
For this reason, a method has been adopted in which a program to be inspected is actually run on a target machine and an error in use of a function parameter name is detected from an abnormal phenomenon caused by contradiction.

【0003】また、関数間の関数コール時の関数パラメ
ータの設定有無の合理性のチェックは、コンパイラ、リ
ンカーによるチェックが複雑になってしまうことから、
ターゲットマシン上で実際に検査対象のプログラムを走
行させ、矛盾により生した異常現象から、逆に関数パラ
メータ設定有無の誤りを検出すると言う方法が取られて
いた。図6は、従来の関数間の関数コール時の状況を示
す説明図であり、送信側部分ロードモジュール80の送
信側関数81において関数コールを行った場合、送信側
パラメータ情報82が受信側ロードモジュール90の受
信側関数91に転送されるようになっている。したがっ
て、関数インタフェースに関するチェック、即ちコール
する関数に対する関数名、パラメータ名及びパラメータ
の設定に関する合理性のチェックは行われていない。
[0003] Checking the rationality of setting a function parameter when a function is called between functions complicates checking by a compiler and a linker.
A method has been adopted in which a program to be inspected is actually run on a target machine, and an error in the presence or absence of setting of a function parameter is detected from an abnormal phenomenon caused by contradiction. FIG. 6 is an explanatory diagram showing a situation at the time of a function call between functions in the related art. When a function call is performed in a transmission function 81 of a transmission partial load module 80, transmission parameter information 82 is stored in a reception load module. The data is transferred to the receiving side function 91 of 90. Therefore, a check on the function interface, that is, a check on rationality regarding the setting of the function name, parameter name, and parameter for the function to be called is not performed.

【0004】[0004]

【発明が解決しようとする課題】このように従来は、関
数名の使用誤り、関数パラメータ名の使用誤り及び関数
パラメータ設定の誤りをそれぞれ検出する場合は、ター
ゲットマシン上で実際に検査対象のプログラムを走行さ
せ、矛盾により生じた現象から、逆に関数名の使用誤
り、関数パラメータ名の使用誤り及び関数パラメータ設
定の誤りを検出する方法が取られている。しかしこの方
法では、矛盾により生じた異常現象は、プログラムの実
行が誤りの存在する地点を通過してから相当数のステッ
プ分を走行した後、異常現象が発現するため、発現した
異常現象からその原因となった誤り箇所を容易に探索す
ることができない。このため、関数名の使用、関数パラ
メータ名の使用及び関数パラメータの設定に誤りがあっ
た場合、その誤りの検出は、単純な誤りであるにもかか
わらず困難な作業を伴い、かつ手間がかかるという問題
があった。したがって本発明は、関数名の使用、関数パ
ラメータ名の使用及び関数パラメータの設定に誤りがあ
った場合、その誤りを容易に検出することを目的とす
る。
As described above, conventionally, when an error in using a function name, an error in using a function parameter name, and an error in setting a function parameter are respectively detected, a program to be inspected is actually executed on a target machine. And a method of detecting an error in using a function name, an error in using a function parameter name, and an error in setting a function parameter from a phenomenon caused by the contradiction. However, in this method, the abnormal phenomena caused by the contradiction occur after running the program for a considerable number of steps after passing the point where the error exists, and then the abnormal phenomena appear. The cause of the error cannot be easily searched for. For this reason, when there is an error in the use of the function name, the use of the function parameter name, and the setting of the function parameter, the detection of the error involves a difficult operation and is troublesome despite a simple error. There was a problem. Therefore, an object of the present invention is to easily detect an error in the use of a function name, the use of a function parameter name, and the setting of a function parameter when the error occurs.

【0005】[0005]

【課題を解決するための手段】このような課題を解決す
るために本発明は、関数名の使用、関数パラメータ名の
使用及び関数パラメータの設定に誤りがあった場合、直
ちにその誤りを検出して通知することで誤り検出を容易
にするものであり、次のような手段を有する。即ち、送
信側関数では関数コール時にコールする関数名から生成
した関数キー情報をコールされる受信側関数に送信し、
受信側関数では受信した関数キー情報と受信側関数名か
ら生成した関数キー情報とを関数キー情報チェックルー
チンにより比較し、不一致が検出されるとプログラムの
障害通知を行う方法である。また、送信側関数では関数
コール時にコールする関数のパラメータ名より生成した
パラメータキー情報をコールされる受信側関数に送信
し、受信側関数では受信したパラメータキー情報と受信
側関数のパラメータ名から生成したパラメータキー情報
とをパラメータキー情報チェックルーチンにより比較
し、障害通知を行う方法である。また、送信側関数では
関数コール時に、パラメータが設定されたときフラグが
オンとなるパラメータ設定キー情報をコールされる受信
側関数に送信し、受信側関数では受信したパラメータ設
定キー情報と受信側関数のパラメータ定義より生成した
パラメータ設定キー情報とをパラメータ設定キー情報チ
ェックルーチンにより比較し、障害通知を行う方法であ
る。また、送信側関数から関数コールされると受信側関
数は、関数コールの終了時に、送信側関数宛に返信パラ
メータが設定されたときフラグがオンとなるパラメータ
設定キー情報を送信側関数に返信し、送信側関数は返信
されたパラメータ設定キー情報とコール対象関数のパラ
メータ定義より生成したパラメータ設定キー情報とをパ
ラメータ設定キー情報チェックルーチンにより比較し、
障害通知を行う方法である。
SUMMARY OF THE INVENTION In order to solve such a problem, the present invention detects an error in the use of a function name, the use of a function parameter name, and the setting of a function parameter, and immediately detects the error. By notifying the error, the error detection is facilitated, and has the following means. That is, the transmitting function transmits the function key information generated from the function name to be called at the time of the function call to the called receiving function,
In the receiving function, the received function key information is compared with the function key information generated from the receiving function name by a function key information check routine, and when a mismatch is detected, a failure notification of the program is performed. Also, the sending function sends the parameter key information generated from the parameter name of the function to be called at the time of the function call to the called receiving function, and the receiving function generates the parameter key information from the received parameter key information and the parameter name of the receiving function. This is a method of comparing the obtained parameter key information with a parameter key information check routine to notify a failure. Also, at the time of the function call, the transmitting side function transmits parameter setting key information that turns on the flag when a parameter is set to the called receiving side function, and the receiving side function transmits the received parameter setting key information and the receiving side function. In this method, the parameter setting key information generated from the parameter definition described above is compared with a parameter setting key information check routine, and a failure notification is performed. When the function is called from the sending function, the receiving function returns parameter setting key information that turns on the flag when the return parameter is set to the sending function at the end of the function call to the sending function. , The transmitting function compares the returned parameter setting key information with the parameter setting key information generated from the parameter definition of the call target function by the parameter setting key information check routine,
This is a method of notifying a failure.

【0006】[0006]

【発明の実施の形態】以下、本発明について図面を参照
して説明する。図1は、本発明に係る関数インタフェー
スのチェック方法を説明する説明図であり、2つの部分
ロードモジュール10,20を用い、送信側部分ロード
モジュール10上の送信側関数11が受信側部分ロード
モジュール20上の受信側関数21をコールする場合の
例を示すものである。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below with reference to the drawings. FIG. 1 is an explanatory diagram for explaining a method of checking a function interface according to the present invention, in which two partial load modules 10 and 20 are used, and a transmitting function 11 on a transmitting partial load module 10 is used as a receiving partial load module. FIG. 3 shows an example of a case where a reception-side function 21 on 20 is called.

【0007】送信側関数11は受信側関数21をコール
する場合、関数間インタフェースの正常性をチェックす
るために、送信側パラメータ情報13のみならず、正常
性をチェックするための送信側キー情報12を受信側関
数21に引き渡す。受信側関数21では送信側関数キ一
情報12を受けとると、送信側関数キー情報12と自分
で保持している受信側キー情報22とをキー情報チェッ
クルーチン23を用いて比較し、一致すれば、関数間イ
ンタフェースは正常として処理を続行し、不一致であれ
ば、関数間インタフェースを異常として、その場でプロ
グラムの障害情報を試験者に端末等を通して通知する。
When the transmitting function 11 calls the receiving function 21, not only the transmitting parameter information 13 but also the transmitting key information 12 for checking the normality of the inter-function interface is provided. Is passed to the receiving-side function 21. When receiving the transmission-side function key information 12, the reception-side function 21 compares the transmission-side function key information 12 with the reception-side key information 22 held by the user using the key information check routine 23. Then, the inter-function interface is assumed to be normal, and the processing is continued. If they do not match, the inter-function interface is regarded as abnormal, and fault information of the program is immediately notified to the tester through a terminal or the like.

【0008】さらに、関数コール終了時、受信側関数2
1は返信情報として受信側キー情報22を送信側関数1
1に返信する。送信側関数11では、返信された受信側
キー情報22と、送信側キー情報12をキー情報チェッ
クルーチン15を用いて比較し、一致すれば関数間イン
タフェースは正常として処理を続行し、不一致であれ
ば、関数間インタフェースを異常として、その場でプロ
グラムの障害情報を試験者に端末等を通して通知する。
Further, at the end of the function call, the receiving side function 2
Numeral 1 indicates the receiving side key information 22 as reply information and the transmitting side function 1
Reply to 1. The transmitting-side function 11 compares the returned receiving-side key information 22 with the transmitting-side key information 12 by using the key information check routine 15. If they match, the inter-function interface is assumed to be normal and processing is continued. For example, the inter-function interface is determined to be abnormal, and the tester is notified of the fault information of the program on the spot through a terminal or the like.

【0009】図2は、送信側関数11が関数をコールす
る場合の、キー情報、パラメータ情報、キー設定ルーチ
ン及びキーチェックルーチンの詳細な例を示す図であ
る。また、図3は、関数コールされる場合の受信側関数
21でのキー情報、キーチエックルーチン及びキー設定
ルーチンの詳細の例を示す図である。また、図4は、関
数コールを行う送信側関数50のコーディング例を示す
図である。また、図5は、関数コールされる受信側関数
70のコーディング例を示す図である。
FIG. 2 is a diagram showing a detailed example of key information, parameter information, a key setting routine, and a key check routine when the transmitting function 11 calls a function. FIG. 3 is a diagram showing an example of details of key information, a key check routine, and a key setting routine in the reception-side function 21 when a function is called. FIG. 4 is a diagram illustrating a coding example of a transmission-side function 50 that performs a function call. FIG. 5 is a diagram illustrating a coding example of the receiving-side function 70 to be called.

【0010】ここで、図4の送信側関数50は、図5の
受信側関数70を関数コールする場合の例を示し、図5
の受信関数70は、図4の送信側関数50に関数コール
される場合の例を示している。また、図2に示すキー情
報及びルーチン情報は、図4の送信側関数50が図5の
受信側関数70を関数コールする場合のキー情報、ルー
チン情報の例を示し、また図3に示すキー情報、ルーチ
ン情報は、図5の受信側関数70が図4の送信側関数5
0に関数コールされる場合のキー情報、ルーチン情報の
例を示している。
FIG. 4 shows an example in which the transmitting side function 50 in FIG. 4 calls the receiving side function 70 in FIG.
Shows an example in which the function 70 is called by the transmitting function 50 in FIG. The key information and the routine information shown in FIG. 2 are examples of the key information and the routine information when the transmitting function 50 in FIG. 4 calls the receiving function 70 in FIG. The information and the routine information are as follows: the receiving function 70 in FIG.
An example of key information and routine information when a function call is made to 0 is shown.

【0011】以下、図2〜図5を用いてキー情報の作成
方法の詳細について説明する。キー情報の値と、受け側
設定キー情報と、キー情報のチェックルーチンと、キー
情報の設定ルーチンはコンパイラによって生成される。
即ち、コンパイラによるプログラムのコンパイル時、コ
ンパイラはコーディングされたステートメントからキー
情報の値と、受け側設定キー情報の値と、キー情報のチ
ェックルーチンと、キー情報の設定ルーチンを生成す
る。
The details of a method for creating key information will be described below with reference to FIGS. The value of the key information, the receiving side setting key information, the key information checking routine, and the key information setting routine are generated by a compiler.
That is, when the program is compiled by the compiler, the compiler generates a value of key information, a value of key setting key information, a check routine of key information, and a key information setting routine from the coded statement.

【0012】送り側設定キー情報はコンパイラにより生
成されない。送り側設定キー情報値は、コンパイラによ
り生成されたキー情報設定ルーチンによってプログラム
が実際に走行する時に設定される。キー情報は、キー情
報に対応する情報について、それらの間の同一性をチェ
ックするためのものである。従って、キー情報に対応す
る情報からのキー情報の生成は、同一の方法、同一の規
則で生成されればよい。
The sender-side setting key information is not generated by the compiler. The sending-side setting key information value is set when the program actually runs by a key information setting routine generated by the compiler. The key information is for checking the identity between the pieces of information corresponding to the key information. Therefore, the key information may be generated from the information corresponding to the key information by the same method and the same rule.

【0013】ここでの例では、キー情報の生成は、全て
キー情報の対応となる名称の各文字のASCIIコード
値を全加算することによってキー情報の生成を行ってい
る。関数キーは関数名称文字のASCIIコードを加算
して生成する。パラメータキーはパラメータフィールド
名称文字のASCIIコードとパラメータ属性名称文字
のASCIIコードを全加算して生成する。
In this example, the key information is generated by adding all the ASCII code values of the characters having names corresponding to the key information. The function key is generated by adding the ASCII code of the function name character. The parameter key is generated by fully adding the ASCII code of the parameter field name character and the ASCII code of the parameter attribute name character.

【0014】図2において、送信側関数キー30は、図
4の行位置62で指定したコール先の関数名「func
2」より生成される。行位置62の「func2」の各
文字のASCIIコードを全加算してキー情報値「47
8」を得る。図2において、送信側パラメータキー31
は図4の行位置52、58、55、56のパラメータ定
義名を用いて生成される。ここでのキー情報は、チェッ
クの精度を向上させるため、単にフィールド名称のみで
なくパラメータの属性定義も合わせてキー情報を生成す
る。
In FIG. 2, the function key 30 on the transmission side is a function name "func" of the call destination designated by the line position 62 in FIG.
2 ". The ASCII code of each character of “func2” at the line position 62 is fully added to obtain the key information value “47”.
8 "is obtained. In FIG. 2, the transmission-side parameter key 31
Are generated using the parameter definition names at the row positions 52, 58, 55, and 56 in FIG. In order to improve the accuracy of the check, the key information is generated not only with the field name but also with the attribute definition of the parameter.

【0015】第1パラメータ「p1d」のキー情報値
は、行位置52のパラメータ名「p1d」の加算値「2
61」と属性定義「int」の加算値「331」を加算
してキー情報値「592」を得る。同様にして、第2パ
ラメータ「p2d」のキー情報値は、行位置58のパラ
メータ名「p2d」の加算値「262」と属性定義
「*」の加算値「42」を加算して「304」を得る。
第3パラメータ「p3d」のキー情報値は、行位置55
のパラメータ名「p3d」の加算値「263」と属性定
義「char」の加算値「414」を加算して「67
7」を得る。第4パラメータ「p4d」のキー情報値
は、行位置56のパラメータ名「p4d」の加算値「2
64」と属性定義「char」の加算値「414」を加
算して「678」を得る。
The key information value of the first parameter “p1d” is obtained by adding the value “2” of the parameter name “p1d” at the row position 52 to “2”.
The key information value “592” is obtained by adding the addition value “331” of the attribute definition “int” to “61”. Similarly, the key information value of the second parameter “p2d” is obtained by adding the added value “262” of the parameter name “p2d” at the row position 58 and the added value “42” of the attribute definition “*” to “304”. Get.
The key information value of the third parameter “p3d” is the row position 55
The addition value “263” of the parameter name “p3d” and the addition value “414” of the attribute definition “char” are added to “67”.
7 ". The key information value of the fourth parameter “p4d” is the sum “2” of the parameter name “p4d” at the row position 56.
"678" is obtained by adding the added value "414" of the attribute definition "char" to "64".

【0016】このようにパラメータキー情報では、パラ
メータ名称のみではなく属性定義も加味してキー情報を
作成するため、パラメータ名称の誤りのみではなく、属
性定義の誤りも検出することが出来ることになる。図3
において、受信側関数キー40は図5の行位置71での
受信側関数名「func2」より生成される。行位置7
1の「func2」の各文字のASCIIコードを加算
してキー情報値「478」を得る。
As described above, in the parameter key information, the key information is created in consideration of not only the parameter name but also the attribute definition, so that not only an error in the parameter name but also an error in the attribute definition can be detected. . FIG.
In, the receiving side function key 40 is generated from the receiving side function name “func2” at the row position 71 in FIG. Row position 7
The key information value “478” is obtained by adding the ASCII code of each character “func2” of “1”.

【0017】図3において、受信側パラメータキー41
は図5の行位置72、77、75、76のパラメータ定
義名、及びパラメータ属性定義名より生成される。第1
パラメータ「p1d」のキー情報値は、行位置72のパ
ラメータ名「p1d」の加算値「261」と属性定義
「int」の加算値「331」を加算してキー情報値
「592」を得る。同様にして、第2パラメータ「p2
d」のキー情報値は、行位置77のパラメータ名「p2
d」の加算値「262」と属性定義「*」の加算値「4
2」を加算して「304」を得る。第3パラメータ「p
3d」のキー情報値は、行位置75のパラメータ名「p
3d」の加算値「263」と属性定義「char」の加
算値「414」を加算して「677」を得る。第4パラ
メータ「p4d」のキー情報値は、行位置76のパラメ
ータ名「P4d」の加算値「264」と属性定義「ch
ar」の加算値「414」を加算して「678」を得
る。
In FIG. 3, the receiving side parameter key 41
Are generated from the parameter definition names and the parameter attribute definition names at the row positions 72, 77, 75, and 76 in FIG. First
The key information value of the parameter “p1d” is obtained by adding the addition value “261” of the parameter name “p1d” at the row position 72 and the addition value “331” of the attribute definition “int” to obtain a key information value “592”. Similarly, the second parameter “p2
The key information value of “d” is the parameter name “p2
d ”and“ 4 ”of the attribute definition“ * ”
2 "to obtain" 304 ". The third parameter “p
The key information value of “3d” is the parameter name “p” at the row position 75.
The addition value “263” of “3d” and the addition value “414” of the attribute definition “char” are added to obtain “677”. The key information value of the fourth parameter “p4d” is the addition value “264” of the parameter name “P4d” at the row position 76 and the attribute definition “ch”.
The addition value “414” of “ar” is added to obtain “678”.

【0018】図2において、送信側パラメータ設定キー
32の「p1」、「p2」、「p3」の「son」はコ
ンパイラでは生成されない。コンパイラでは、設定キー
を設定するための設定ルーチンが生成される。送信側パ
ラメータ設定キー32の「p1」、「p2」、「p3」
の「son」は、プログラム実行時、図4の行位置5
9、60、61の各ステートメントの直後に埋め込まれ
た設定キー設定ルーチンによって生成される。
In FIG. 2, "son" of "p1,""p2," and "p3" of the transmission-side parameter setting keys 32 are not generated by the compiler. The compiler generates a setting routine for setting a setting key. “P1”, “p2”, “p3” of the transmission-side parameter setting key 32
"Son" indicates that the line position 5 in FIG.
It is generated by a setting key setting routine embedded immediately after each of the statements 9, 60 and 61.

【0019】第1パラメータ「p1」の「son」は行
位置59のステートメント「p1=10」が実行された
後、その直後に埋め込まれた設定キー設定ルーチンによ
って生成される。同様にして、第2パラメータ「p2」
の「son」は行位置60のステートメント「p2=&
p2a」が実行された後、その直後に埋め込まれた設定
キー設定ルーチンによって生成される。第3パラメータ
「p3」の「son」は行位置61のステートメント
「p2−>p3d=30」が実行された後、その直後に
埋め込まれた設定キー設定ルーチンによって生成され
る。ここで、「son」は送信パラメータ情報が設定さ
れたことを意味する。
The "son" of the first parameter "p1" is generated by the setting key setting routine embedded immediately after the statement "p1 = 10" at the line position 59 is executed. Similarly, the second parameter “p2”
Is the statement "p2 = &
After the execution of "p2a", it is generated by the setting key setting routine embedded immediately after that. The “son” of the third parameter “p3” is generated by the setting key setting routine embedded immediately after the statement “p2-> p3d = 30” at the line position 61 is executed. Here, “son” means that transmission parameter information has been set.

【0020】図2において、送信側パラメータ設定キー
32の「p4」の「ron」は、図4の行位置56のパ
ラメータ定義の入出力指定を基にして、コンパイラによ
り生成される。ここでは、第4パラメータ「p4」は行
位置56で「in」指定されているため、「ron」が
生成される。「ron」は返信パラメータ情報が設定さ
れてくること意味する。
In FIG. 2, “ron” of “p4” of the transmission-side parameter setting key 32 is generated by the compiler based on the input / output specification of the parameter definition at the line position 56 in FIG. Here, since the fourth parameter “p4” is specified as “in” at the row position 56, “ron” is generated. “Ron” means that the reply parameter information is set.

【0021】図3において、受信側パラメータ設定キー
42の「p1」、「p2」、「p3」の「son」は、
図5の行位置73、77、75のパラメータ定義の入出
力指定を基にして、コンパイラにより生成される。第1
パラメータ「p1」は行位置73で「in」指定されて
いるため、「son」が生成される。第2パラメータ
「p2」は行位置77で「in」指定されているため、
「son」が生成される。第3パラメータ「p3」は行
位置75で「in」指定されているため、「son」が
生成される。ここで、「son」は送信パラメータ情報
が設定されてくることを意味する。
In FIG. 3, “son” of “p1,” “p2,” and “p3” of the reception-side parameter setting key 42 is
It is generated by the compiler based on the input / output specification of the parameter definition at the line positions 73, 77, and 75 in FIG. First
Since the parameter “p1” is specified as “in” at the line position 73, “son” is generated. Since the second parameter “p2” is specified as “in” at the line position 77,
"Son" is generated. Since the third parameter “p3” is specified as “in” at the row position 75, “son” is generated. Here, "son" means that transmission parameter information is set.

【0022】図3において、受信側パラメータ設定キー
42の「p4」の「ron」は、コンパイラでは生成さ
れない。コンパイラでは、設定キーを設定するための設
定ルーチンが生成される。受信側パラメータ設定キー4
2の「p4」の「ron」は、プログラム実行時、行位
置78のステートメント「p2−>p4d=40」が実
行された後に、その直後に埋め込まれた設定キー設定ル
ーチンによって生成される。なお、図2において、送信
側パラメータ33は、関数コール時、送信側関数50と
受信側関数70とで送受信される実際のパラメータ情報
である。
In FIG. 3, "ron" of "p4" of the receiving-side parameter setting key 42 is not generated by the compiler. The compiler generates a setting routine for setting a setting key. Receiving-side parameter setting key 4
The “ron” of “p4” of No. 2 is generated by the setting key setting routine embedded immediately after the statement “p2-> p4d = 40” at the line position 78 is executed when the program is executed. In FIG. 2, the transmission-side parameter 33 is actual parameter information transmitted and received between the transmission-side function 50 and the reception-side function 70 at the time of a function call.

【0023】次に、キー設定ルーチン、キーチェックル
ーチンの生成方法の詳細を、図2〜図5を用いて説明す
る。ここで、キー設定ルーチンはパラメータ情報が設定
された時、対応するパラメータ設定キー情報を設定する
機能を持つ。また、キーチェックルーチンは双方のチェ
ック対象のキー情報が一致しているか否かを判定する機
能を持つ。
Next, details of a method of generating the key setting routine and the key check routine will be described with reference to FIGS. Here, the key setting routine has a function of setting the corresponding parameter setting key information when the parameter information is set. The key check routine has a function of determining whether both pieces of key information to be checked match.

【0024】図2において、パラメータ設定キー設定ル
ーチン34は、図4で行位置59、60、61の各ステ
ートメントがそれぞれ実行されると、送信側パラメータ
設定キー32の「P1」、「P2」、「P3」のパラメ
ータ設定キーフラグがそれぞれ「son」となるような
ルーチンで、コンパイラによって生成される。設定ルー
チンは、「p1」を「son」とする機能部分が行位置
59の直後に、「p2」を「son」とする機能部分が
行位置60の直後に、「p3」を「son」とする機能
部分が行位置61の直後に、それぞれ埋め込まれる。こ
こで、「son」フラグは、送信パラメータが設定され
たことを意味する。
In FIG. 2, when the statements at the line positions 59, 60, and 61 are respectively executed in FIG. 4, the parameter setting key setting routine 34 sets “P1”, “P2”, The routine is such that the parameter setting key flag of “P3” becomes “son” and is generated by the compiler. In the setting routine, the function part that sets “p1” to “son” immediately after the row position 59, the function part that sets “p2” to “son” immediately after the row position 60, and “p3” sets “son”. The function part to be executed is embedded immediately after the row position 61. Here, the “son” flag means that the transmission parameter has been set.

【0025】図2において、パラメータ設定キーチェッ
クルーチン35は、図4で行位置62の関数コールの実
行終了時、コール先の受信側関数70からの返信情報で
ある受信側パラメータ設定キー42の「p4d」の「r
on」をチェックするためのルーチンで、コンパイラー
により生成される。チェックルーチンは送信側関数50
内の行位置62の関数コールステートメントの直後の位
置に埋め込まれる。
In FIG. 2, when the execution of the function call at the row position 62 in FIG. 4 is completed, the parameter setting key check routine 35 is executed by the reception parameter setting key 42 which is the return information from the reception function 70 of the call destination. "p4d"
A routine for checking "on", generated by the compiler. The check routine is the sender function 50
Is embedded in a position immediately after the function call statement at line position 62 in the line.

【0026】図3において、関数キーチエックルーチン
43は、図5の受信側関数70が関数コールされて実行
される時、送信されてきた送信側側関数キー30をチェ
ックするためのルーチンで、コンパイラにより生成され
る。チェックルーチンは受信側関数70内の処理先頭位
置に埋め込まれる。図3において、パラメータキーチェ
ックルーチン44は、図5の受信側関数70が関数コー
ルされて実行される時、送信されてきた送信側パラメー
タキー31をチェックするためのルーチンで、コンパイ
ラーにより生成される。チェックルーチンは受信側関数
70内の処理先頭位置に埋め込まれる。
In FIG. 3, a function key check routine 43 is a routine for checking the transmission side function key 30 transmitted when the reception side function 70 of FIG. 5 is called and executed. Generated by The check routine is embedded at the processing start position in the receiving side function 70. In FIG. 3, a parameter key check routine 44 is a routine for checking the transmitted transmission-side parameter key 31 when the reception-side function 70 of FIG. 5 is called and executed, and is generated by a compiler. . The check routine is embedded at the processing start position in the receiving side function 70.

【0027】図3において、パラメータ設定キーチエッ
クルーチン45は、図5の受信側関数70が関数コール
されて実行される時、送信されてきた送信側パラメータ
設定キー32をチェックするためのルーチンで、コンパ
イラーにより生成される。チェックルーチンは受信側関
数70内の処理先頭位置に埋め込まれる。図3におい
て、パラメータ設定キー設定ルーチン46は、図5で行
位置78のステートメントが実行されると、受信側パラ
メータ設定キー42の「P4」のパラメータ設定キーフ
ラグが「ron」となるようなルーチンで、コンパイラ
によって生成される。設定ルーチンは、受信側関数70
内の行位置78のステートメントの直後に埋め込まれ
る。ここで、「ron」フラグは返信パラメータが設定
されたことを意味する。
In FIG. 3, a parameter setting key check routine 45 is a routine for checking the transmitted parameter setting key 32 transmitted when the receiving function 70 shown in FIG. 5 is called and executed. Generated by the compiler. The check routine is embedded at the processing start position in the receiving side function 70. In FIG. 3, the parameter setting key setting routine 46 is a routine in which, when the statement at the line position 78 in FIG. 5 is executed, the parameter setting key flag “P4” of the receiving side parameter setting key 42 becomes “ron”. , Generated by the compiler. The setting routine is performed by the receiving function 70.
Is embedded immediately after the statement at line position 78. Here, the “ron” flag means that the return parameter has been set.

【0028】次に、関数コール時のキー情報のチェック
処理の流れの詳細を図2〜図5を用いて説明する。図4
において、送信側関数50の実行が開始されたとする。
関数の実行が進行し行位置59の「p1=10」ステー
トメントが実行されると、その直後に埋め込まれた設定
ルーチンにより、図2の送信側パラメータ設定キー32
の「p1」に[son」フラグが設定される。同様に、
行位置60の「p2=&p2a」のステートメントが実
行されると、その直後に埋め込まれた設定ルーチンによ
り、送信側パラメータ設定キー32の「p2」に[so
n」フラグが設定される。行位置61の「p2−>p3
d=30」のステートメントが実行されると、その直後
に埋め込まれた設定ルーチンにより、送信側パラメータ
設定キー32の「p3」に[son」フラグが設定され
る。以上のように、パラメータ設定キーは、実際に対応
するパラメータが設定された時に設定される。
Next, details of the flow of the key information check processing at the time of a function call will be described with reference to FIGS. FIG.
, The execution of the transmission-side function 50 is started.
When the execution of the function progresses and the “p1 = 10” statement at line position 59 is executed, the setting routine embedded immediately after that causes the transmission-side parameter setting key 32 in FIG.
The [son] flag is set to "p1" of the. Similarly,
When the statement of “p2 = & p2a” at the line position 60 is executed, [so] is added to “p2” of the transmission-side parameter setting key 32 by a setting routine embedded immediately thereafter.
The "n" flag is set. "P2->p3" at line position 61
When the statement of “d = 30” is executed, the “son” flag is set in “p3” of the transmission-side parameter setting key 32 by the setting routine embedded immediately after that. As described above, the parameter setting key is set when the corresponding parameter is actually set.

【0029】ここでもし、図4の行位置59の「p1=
10」のステートメントの作成が漏れていたとすれば、
それに対応する設定ルーチンは生成されないため、図2
の送信側パラメータ設定キー32の「p1」の「so
n」が設定されないことになり、関数コール実行時、コ
ール先関数でのパラメータ設定キーチェックにより「s
on」のチェックがなされ、「son」不一致によりチ
ェック異常となり、プログラム障害の通知がなされるこ
とになる。
Here, if "p1 =" in row position 59 in FIG.
If the statement of "10" was omitted,
Since no corresponding setting routine is generated, FIG.
"So" of "p1" of the transmission-side parameter setting key 32
n ”is not set, and when a function call is executed,“ s ”is checked by the parameter setting key check in the called function.
"on" is checked, and a check error occurs due to "son" mismatch, and a program failure is notified.

【0030】さらに関数の実行が進行し、図4の行位置
62の「func2(p1、p2)」が実行される時、
図2の送信側パラメータ33のみならず、コンパイル時
に編集された送信側関数キー30、送信側パラメータキ
ー31、及び関数実行時に設定した送信側パラメータ設
定キー32が図5の受信側関数70に引き渡される。関
数コールが実行されると、処理実行はコールした送信関
数50からコールされた受信側関数70に移行する。
When the execution of the function further proceeds and “func2 (p1, p2)” at line position 62 in FIG. 4 is executed,
Not only the transmission-side parameter 33 in FIG. 2 but also the transmission-side function key 30, the transmission-side parameter key 31, and the transmission-side parameter setting key 32 set during execution of the function are passed to the reception-side function 70 in FIG. It is. When the function call is executed, the process execution shifts from the calling transmitting function 50 to the called receiving function 70.

【0031】関数コールされた受信側関数70では、自
関数内の処理を開始する前に、自関数内に持つキーチエ
ックルーチンを用いて、引き渡されたキー情報と自関数
内に持つキー情報とを比較チェックする。比較して一致
すれば、引き続いて関数処理を実行するが、不一致であ
れば、割り込みを用いて、その場でプログラムの障害情
報を端末に出力し、試験者に通知した後に、関数処理を
続行することになる。関数コールされた受信側関数70
では、自関数内の処理を開始する前に、関数キーチェッ
クルーチン43を用いて、引き渡された送信側関数キー
30のキー情報値「478」と自関数内に持つ受信側関
数キー40のキー情報値「478」とを比較する。この
例では同一値のため、比較した結果は一致し、チェック
正常として障害の通知はなしに次の処理に進む。
Before the processing in the self-function is started, the called function 70 uses the key check routine in the self-function to determine the transferred key information and the key information in the self-function. Check the comparison. If they match, the function processing is executed continuously, but if they do not match, the fault information of the program is output to the terminal immediately using an interrupt, the tester is notified, and the function processing is continued. Will do. Receiver function 70 called
Before starting the processing in the self-function, the key information value “478” of the delivered transmission-side function key 30 and the key of the reception-side function key 40 included in the self-function are used by using the function key check routine 43. The value is compared with the information value “478”. In this example, since the values are the same, the comparison results match, and the process proceeds to the next process without notification of failure as normal check.

【0032】同様にして、受信側関数70では、引き続
きパラメータキーチェックルーチン44を用いて、引き
渡された送信側パラメータキー31の「p1d+in
t」の「592」、「p2d+*」の「304」、「P
3d+char」の「677」、「p4d+char」
の「678」と自関数内に持つ受信側パラメータキー4
1の「p1d+int」の「592」、「p2d+*」
の「304」、「P3d+char」の「677」、
「p4d+char」の「678」とをそれぞれ比較す
る。この例では全て同一値のため、比較結果は一致し、
チェック正常として障害の通知はなしに次の処理に進
む。
Similarly, the reception-side function 70 continuously uses the parameter key check routine 44 to set “p1d + in” of the delivered transmission-side parameter key 31.
t ”,“ 304 ”of“ p2d ++ ”,“ P ”
"677", "p4d + char" of "3d + char"
"678" and the receiver-side parameter key 4 in its own function
“592”, “p2d ++” of “p1d + int” of No. 1
"304", "P3d + char""677",
"678" of "p4d + char" is compared. In this example, since all values are the same, the comparison results match,
The process proceeds to the next process without notification of a failure as a normal check.

【0033】さらに、受信側関数70では、引き続きパ
ラメータ設定キーチェックルーチン45を用いて、引き
渡された送信側パラメータ設定キー32の「p1」の
「son」、「p2」の「son」、「p3」の「so
n」と自関数内に持つ受信側パラメータ設定キー42の
「p1」の「son」、「p2」の「son」、「p
3」の「son」とをそれぞれ比較する。この例では全
て同一植のため、比較結果は一致し、チェック正常とし
て障害の通知はなしに次の処理に進む。
Further, the receiving-side function 70 continuously uses the parameter setting key check routine 45 to send “p1” “son”, “p2” “son”, and “p3” of the transmitted transmitting-side parameter setting key 32. ”
n ”and“ son ”of“ p1 ”,“ son ”of“ p2 ”, and“ p ”
3 is compared with “son”. In this example, since all plants are the same, the comparison results match, and the process proceeds to the next process without notification of a failure as normal check.

【0034】ここで、送信側関数50が受信側関数70
に引き渡す30、31のキー情報値は送信側関数50で
定義した関数名、パラメータ名より生成したものであ
り、一方、受信側関数で保持する40、41のキー情報
値は、受信側関数で定義した関数名、パラメータ名より
生成したものである。従って、もし送信側関数50での
関数名、パラメータ名の定義を誤って、受信側関数70
で定義した関数名、パラメータ名とは異なる定義を行っ
てしまった場合、それによって生成されるキー情報値は
送信側と受信側で異なってくる。このため、このような
場合には関数コール時に、キー情報をチェックすると不
一致となり、この不一致の情報から関数名、パラメータ
名の設定誤りを検出することができることになる。
Here, the transmitting side function 50 is replaced by the receiving side function 70
The key information values of 30 and 31 passed to are generated from the function names and parameter names defined in the transmitting function 50, while the key information values of 40 and 41 held by the receiving function are stored in the receiving function. It is generated from the defined function name and parameter name. Therefore, if the function name and the parameter name are incorrectly defined in the transmitting function 50, the receiving function 70
If the definition is different from the function name and parameter name defined in, the key information value generated thereby differs between the transmitting side and the receiving side. For this reason, in such a case, when the key information is checked at the time of the function call, the key information does not match, and a setting error of the function name and the parameter name can be detected from the mismatch information.

【0035】図2〜図5の例では関数名、パラメータ名
に誤りのない場合の例であるため、図2の送信側キー情
報値と図3の受信側キー情報値は全て一致している。し
かし、例えば送信側関数50の行位置53でパラメータ
定義名を「p1d」から「pxd」に誤ったとすれば、
図2の送信側パラメータキー31の第1パラメータキー
は、「p1d+int」ではなく「pxd+int」と
なり、キー情報値は「592」ではなく、「639」と
なる。これによって、関数コール実行時、キー情報のチ
ェックを行うと、送信側のキー情報値と受信側のキー情
報値は異なるため、キー情報値の比較不一致でキー情報
チェック異常となり、これから第1パラメータ「px
d」の誤りを検出できる。
In the examples of FIGS. 2 to 5, there are no errors in the function name and the parameter name, so that the transmission side key information value in FIG. 2 and the reception side key information value in FIG. 3 all match. . However, if the parameter definition name is incorrect from “p1d” to “pxd” at the line position 53 of the transmitting side function 50, for example,
The first parameter key of the transmission-side parameter key 31 in FIG. 2 is “pxd + int” instead of “p1d + int”, and the key information value is “639” instead of “592”. As a result, when the key information is checked at the time of executing the function call, the key information value on the transmitting side and the key information value on the receiving side are different. "Px
d "can be detected.

【0036】通常、定義名の不一致は定義名を単純に間
違ったというよりは、機能的に定義名を取り違えている
場合が多い。このため、単純な定義名のチェックだとし
ても、それを実行すれば、機能的誤りを検出する契機と
することができる。したがって、単純な定義名のチェッ
クを実行することによって機能的誤りの検出を期待でき
る。
Normally, inconsistencies in the definition names often result in functional misinterpretation of the definition names, rather than simply erroneous definition names. For this reason, even if it is a simple definition name check, if it is executed, it can be a trigger for detecting a functional error. Therefore, detection of a functional error can be expected by executing a simple definition name check.

【0037】パラメータ設定キーは、パラメータの受信
側で、パラメータが設定されるべきか否かのフラグを持
ち、パラメータの送信側で実際にパラメータが設定され
た時に設定フラグがオンとなるようにし、この双方の設
定フラグを関数コール実行時に一致しているか否かをチ
ェックすることによって、送信パラメータの設定漏れを
検出しようとする。このパラメータ設定漏れの検出はコ
ンパイラ、リンカーによるスタティックなプログラムの
論理チェックで行おうとすると、チェックが複雑とな
り、その実現は難しい。しかし、本例のようにパラメー
タ設定忘れの検出をダイナミックにプログラムの実行時
に行うようにすれば、その検出チェックは容易となる。
The parameter setting key has a flag on the parameter receiving side as to whether or not the parameter should be set, and the setting flag is turned on when the parameter is actually set on the parameter transmitting side. By checking whether these two setting flags match when executing a function call, an attempt is made to detect a setting omission of a transmission parameter. If the detection of this parameter setting omission is attempted by a logic check of a static program by a compiler or a linker, the check becomes complicated and it is difficult to realize the check. However, if the forgotten parameter setting is dynamically detected during the execution of the program as in this example, the detection check can be easily performed.

【0038】図5において、受信側関数70では、関数
がコールされた時のキー情報のチェック処理実行が終了
すると、自関数内の処理の実行を開始する。処理実行が
進行し、受信側関数70の行位置78の「p2−>p4
d=40」のステートメントが実行されると、その直後
に埋め込まれた設定ルーチンにより、図3の受信側パラ
メータ設定キー42の「p4」に「ron」が設定され
る。ここで、「ron」は第4パラメータにデータが設
定されたことを意味する。
In FIG. 5, when the execution of the check processing of the key information at the time of calling the function is completed, the reception side function 70 starts executing the processing in the function itself. Processing progresses, and “p2-> p4” at the row position 78 of the reception-side function 70
When the statement of “d = 40” is executed, “ron” is set to “p4” of the reception-side parameter setting key 42 in FIG. 3 by the setting routine embedded immediately after that. Here, “ron” means that data is set in the fourth parameter.

【0039】さらに受信側関数70内の実行が進行し、
関数コールされた受信側関数70の処理が終了する時、
関数コールした送信側関数50へのパラメータ返信情報
がある場合は、パラメータ返信情報以外に、パラメータ
返信情報に対応したパラメータ設定キー情報が返送され
る。ここでは、図3の受信側パラメータ設定キー42の
「p4」の「ron」が送信側関数50に返送される。
Further, the execution in the receiving side function 70 proceeds,
When the processing of the called function 70 is terminated,
If there is parameter return information to the transmission-side function 50 that called the function, parameter setting key information corresponding to the parameter return information is returned in addition to the parameter return information. Here, “ron” of “p4” of the reception-side parameter setting key 42 in FIG.

【0040】受信側関数70の処理が終了し、関数コー
ルを行った送信側関数50に処理実行が帰還すると、送
信側関数50では、コール先の受信側関数70からの返
信パラメータ情報がある場合、自関数処理を再開する前
に、返信パラメータ情報に対応するパラメータ設定キー
情報をチェックする。送信側関数50では、パラメータ
設定キーチェックルーチン35を用いて、受信側関数7
0から返信された受信側パラメータ設定キー42の「p
4」の「ron」と送信側パラメータ設定キー32の
「p4」の「ron」とを比較チェックする。
When the processing of the receiving function 70 is completed and the execution of the processing is returned to the transmitting function 50 that made the function call, the transmitting function 50 has a case where there is reply parameter information from the receiving function 70 of the call destination. Before restarting the self-function processing, check the parameter setting key information corresponding to the return parameter information. The transmitting side function 50 uses the parameter setting key check routine 35 to execute the receiving side function 7.
“P” of the receiving-side parameter setting key 42 returned from
The “ron” of “4” and the “ron” of “p4” of the transmission-side parameter setting key 32 are compared and checked.

【0041】比較して一致すれば、正常として処理を続
行し、不一致であれば異常として、誤りを検出するため
のプログラムの障害情報を、割り込みを用いてその場で
端末装置に出力する。本例の場合は同一値のため、比較
結果は一致し、チェック正常として障害の通知はなしに
次の処理に進む。
If they match, the processing is continued as normal, and if they do not match, it is regarded as abnormal and fault information of the program for detecting the error is output to the terminal device on the spot using an interrupt. In the case of this example, since the values are the same, the comparison results match, the check is normal, and the process proceeds to the next process without notification of a failure.

【0042】もしここで、受信側関数70の行位置78
での第4パラメータの設定が漏れていれば、それに対応
する設定ルーチンは生成されないため、受信側パラメー
タ設定キー42の「p4」には「ron」が設定されな
くなり、帰還した場合の設定キー情報チェックで設定キ
一情報不一致となり、第4パラメータの設定漏れが検出
できる。
If the row position 78 of the receiving function 70
If the setting of the fourth parameter is omitted, the setting routine corresponding to the setting is not generated, so that "ron" is not set in "p4" of the receiving-side parameter setting key 42, and the setting key information in the case of feedback is returned. If the check indicates that the setting key information does not match, the setting omission of the fourth parameter can be detected.

【0043】このように本発明は、関数をコールする側
の関数と関数をコールされる側の関数で、各々使用する
関数名、パラメータ名及びパラメータ設定有無情報に対
してキー情報を作成し、関数コール実行時に双方で作成
したキー情報を照合させることによって、関数インター
フェース情報である関数名、パラメータ名、パラメータ
設定有無の誤りを検出するものである。即ち、関数コー
ルを行う送信側関数では、コール対象の関数名からその
コール対象の関数名に対応した関数キー情報をコンパイ
ル時に生成し、この関数キー情報は関数名に一意的に対
応する。一方、コールされる側の受信側関数では、受信
側関数名より、その受信側関数名に対応した関数キー情
報と、関数コール時に受信する関数キー情報をチェック
するための関数キー情報チェックルーチンがコンパイル
時に生成される。そして、関数コール実行時、コールす
る側の送信側関数では、コール対象の関数名から生成し
た関数キー情報をコールされる側の受信側関数にパラメ
ータ情報と共に引き渡す。受信側関数では、受信側関数
名より生成した関数キー情報と、引き波された関数キー
情報とを関数キー情報チェックルーチンを用いて比較
し、一致すれば、関数コール正常として処理を続行し、
不一致であれば、関数コール誤りとして、誤りを検出す
るためのプログラム障害情報を図示しない端末装置に出
力する。
As described above, according to the present invention, key information is created for a function name, a parameter name, and parameter setting presence / absence information for a function that calls a function and a function that is called a function. By comparing the key information created by both parties at the time of executing the function call, errors in the function name, parameter name, and presence / absence of parameter setting, which are function interface information, are detected. In other words, the transmitting function that makes a function call generates function key information corresponding to the call target function name from the call target function name at the time of compilation, and this function key information uniquely corresponds to the function name. On the other hand, in the called receiver function, the function key information corresponding to the receiver function name and the function key information check routine for checking the function key information received at the time of the function call from the receiver function name are provided. Generated at compile time. Then, when executing the function call, the transmitting function on the calling side transfers the function key information generated from the name of the function to be called to the receiving function on the called side together with the parameter information. In the receiving function, the function key information generated from the receiving function name is compared with the drawn function key information using the function key information check routine, and if they match, the function call is normal and the processing is continued.
If they do not match, as a function call error, program failure information for detecting the error is output to a terminal device (not shown).

【0044】同様にして、パラメータキー情報の場合
は、コールする側の送信側関数では、コール対象の関数
のパラメータの定義名から、パラメータキー情報がコン
パイル時に生成される。コールされる側の受信側関数で
は、受信側関数のパラメ∵タ定義名に対応したパラメー
タキー情報と、関数コール時に受信するパラメータキー
情報をチェックするためのパラメータキー情報チェック
ルーチンがコンパイル時に生成される。そして、関数コ
ール実行時、コールする側の送信側関数では、そのコー
ル対象の関数のパラメータの定義名より生成したパラメ
ータキー情報をコールされる側の受信側関数にパラメー
タ情報と共に引き渡す。受信側関数では、受信側関数の
パラメータ定義名より生成した関数パラメータキー情報
と、引き渡された関数パラメータキー情報とをパラメー
タキー情報チェックルーチンを用いて比較し、一致すれ
ば関数コール正常として処理を続行し、不一致であれば
関数コール誤りとして、誤りを検出するためのプログラ
ムの障害情報を端末装置に出力する。
Similarly, in the case of the parameter key information, in the transmitting function on the calling side, the parameter key information is generated at the time of compilation from the definition name of the parameter of the function to be called. In the called receiving side function, parameter key information corresponding to the parameter definition name of the receiving side function and a parameter key information check routine for checking parameter key information received at the time of function call are generated at compile time. You. Then, at the time of executing the function call, the transmitting side function on the calling side transfers the parameter key information generated from the definition name of the parameter of the function to be called to the receiving side function together with the parameter information. In the receiving function, the function parameter key information generated from the parameter definition name of the receiving function is compared with the passed function parameter key information using the parameter key information check routine. The process is continued, and if they do not match, a function call error is detected, and fault information of a program for detecting the error is output to the terminal device.

【0045】また、パラメータ設定キー情報の場合は、
コールする側の送信側関数では、変数ではなくイミディ
エイトのデータが対応するパラメータに設定された時に
設定フラグをオンとするパラメータ設定キー情報設定ル
ーチンと、そのコール対象の関数のパラメータ定義に基
づいたパラメータ設定キー情報と、パラメータ設定キー
情報をチェックするためのパラメータ設定キー情報チェ
ックルーチンとがコンパイル時に生成される。そして、
コールされる側の受信側関数では、受信側関数のパラメ
ータ定義に基づいたパラメータ設定キー情報と、パラメ
ータ設定キー情報をチェックするためのパラメータ設定
キー情報チェックルーチンと、対応する返信パラメータ
に、変数ではなくイミディエイトのデータが設定された
時に設定フラグをオンとするパラメータ設定キー情報設
定ルーチンとが、コンパイル時に生成される。
In the case of parameter setting key information,
In the calling function, the parameter setting key information setting routine that turns on the setting flag when the immediate data is set to the corresponding parameter instead of the variable, and the parameter based on the parameter definition of the function to be called Setting key information and a parameter setting key information check routine for checking parameter setting key information are generated at the time of compilation. And
In the called function of the called side, the parameter setting key information based on the parameter definition of the receiving function, the parameter setting key information check routine for checking the parameter setting key information, and the corresponding return parameter And a parameter setting key information setting routine that turns on the setting flag when immediate data is set.

【0046】ここで、関数コール実行時、コールする側
の送信側関数では、関数パラメータ情報と共に、パラメ
ータ設定キー情報を引き渡す。コールされる側の受信側
関数では、受信したパラメータ設定キー情報と受信側関
数のパラメータ定義より生成したパラメータ設定キー情
報とをパラメータ設定キー情報チェックルーチンを用い
て比較し、一致すれば、関数コール正常として処理を続
行し、一致しなければ、関数コール誤りとして誤りを検
出するためのプログラムの障害情報を端末装置に出力す
る。そして、関数コール終了時、コールされる側の受信
側関数では、返信パラメータと共に、パラメータ設定キ
ー情報をコールした送信側関数に引き渡す。送信側関数
では、返信されたパラメータ設定キー情報と、そのコー
ル対象の関数のパラメータ定義より生成したパラメータ
設定キー情報とをパラメータ設定キー情報チェックルー
チンにより比較し、一致すれば、関数コール正常として
処理を続行し、一致しなければ、関数コール誤りとして
誤りを検出するためのプログラムの障害情報を端末装置
に出力する。
Here, at the time of executing the function call, the calling function sends the parameter setting key information together with the function parameter information. The called function on the called side compares the received parameter setting key information with the parameter setting key information generated from the parameter definition of the receiving function using the parameter setting key information check routine. Processing is continued as normal, and if they do not match, failure information of a program for detecting an error is output to the terminal device as a function call error. At the end of the function call, the called function on the called side passes the parameter setting key information together with the return parameter to the calling function on the calling side. The sending function compares the returned parameter setting key information with the parameter setting key information generated from the parameter definition of the function to be called by the parameter setting key information check routine. And if they do not match, the failure information of the program for detecting the error as a function call error is output to the terminal device.

【0047】[0047]

【発明の効果】以上説明したように本発明によれば、関
数コール時に受信側関数で受信した関数キー情報により
関数名インタフェースの正常性をその場で自動的にチェ
ックし、関数名インタフェースが誤っていた場合、誤り
の事象がその時点で試験者に通知されるため、誤りを容
易に検出できる。また、関数コール時に受信側関数で受
信したパラメータキー情報により関数パラメータ名イン
タフェースの正常性をその場で自動的にチェックし、関
数パラメータ名インタフェースが誤っていた場合、誤り
の事象がその時点で試験者に通知されるため、同様に誤
りを容易に検出できる。また、関数コール時に受信側関
数で受信したパラメータ設定キー情報により関数パラメ
ータ設定インタフェースの正常性をその場で自動的にチ
ェックし、関数パラメータ設定インタフェースが誤って
いた場合、誤りの事象がその時点で試験者に通知される
ため、同様に誤りを容易に検出できる。また、関数コー
ル終了時に受信側関数から返信されたパラメータ設定キ
ー情報に基づき送信側関数で関数パラメータ設定インタ
フェースの正常性をその場で自動的にチェックし、関数
パラメータ設定インタフェースが誤っていた場合、誤り
の事象がその時点で試験者に通知されるため、同様に誤
りを容易に検出できる。
As described above, according to the present invention, the normality of the function name interface is automatically checked on the spot based on the function key information received by the receiving function at the time of the function call, and the function name interface is incorrect. In this case, the error event is notified to the tester at that time, so that the error can be easily detected. Also, the function parameter name interface is automatically checked on the spot based on the parameter key information received by the receiving function at the time of the function call, and if the function parameter name interface is incorrect, the error event is tested at that point. In this case, the error can be easily detected. In addition, the normality of the function parameter setting interface is automatically checked on the spot based on the parameter setting key information received by the receiving function at the time of the function call, and if the function parameter setting interface is incorrect, the error event Since the tester is notified, an error can be easily detected similarly. Also, at the end of the function call, based on the parameter setting key information returned from the receiving function, the transmitting function automatically checks the normality of the function parameter setting interface on the spot, and if the function parameter setting interface is incorrect, Since the error event is notified to the tester at that time, the error can be similarly easily detected.

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

【図1】 本発明の要部構成を示す機能ブロック図であ
る。
FIG. 1 is a functional block diagram showing a main configuration of the present invention.

【図2】 送信側関数の機能を説明する図である。FIG. 2 is a diagram illustrating a function of a transmission-side function.

【図3】 受信側関数の機能を説明する図である。FIG. 3 is a diagram illustrating a function of a reception-side function.

【図4】 送信側関数の機能動作のコーディング例を示
す図である。
FIG. 4 is a diagram illustrating a coding example of a functional operation of a transmission-side function.

【図5】 受信側関数の機能動作のコーディング例を示
す図である。
FIG. 5 is a diagram illustrating a coding example of a functional operation of a reception-side function.

【図6】 従来の構成を示す機能ブロック図である。FIG. 6 is a functional block diagram showing a conventional configuration.

【符号の説明】[Explanation of symbols]

10,20…部分ロードモジュール、11…送信側関
数、12…送信側キー情報、13…送信側パラメータ情
報、14,24…キー情報設定ルーチン、15,23…
キー情報チェックルーチン、21…受信側関数、22…
受信側キー情報、30…送信側関数キー、31…送信側
パラメータキー、32…送信側パラメータ設定キー、3
3…送信側パラメータ、34,46…パラメータ設定キ
ー設定ルーチン、35,45…パラメータ設定キーチェ
ックルーチン、40…受信側関数キー、41…受信側パ
ラメータキー、42…受信側パラメータ設定キー、43
…関数キーチェックルーチン、44…パラメータキーチ
ェックルーチン。
10, 20: partial load module, 11: transmission side function, 12: transmission side key information, 13: transmission side parameter information, 14, 24 ... key information setting routine, 15, 23 ...
Key information check routine, 21 ... Reception side function, 22 ...
Reception key information, 30: transmission function key, 31: transmission parameter key, 32: transmission parameter setting key, 3
3 ... transmission side parameters, 34, 46 ... parameter setting key setting routine, 35, 45 ... parameter setting key check routine, 40 ... reception side function key, 41 ... reception side parameter key, 42 ... reception side parameter setting key, 43
... function key check routine, 44 ... parameter key check routine.

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 11/28 - 11/36 G06F 9/40 G06F 9/45 G06F 11/08 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 7 , DB name) G06F 11/28-11/36 G06F 9/40 G06F 9/45 G06F 11/08

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 それぞれが関数部を有する複数のプログ
ラムモジュールを備え、各プログラムモジュールの関数
部間のインタフェースをチェックする方法であって、 送信側モジュールの関数部では、関数コール時にコール
する関数名から生成した関数キー情報をコールされる受
信側モジュールの関数部に送信し、受信側モジュールの
関数部では、受信した関数キー情報と受信側関数名から
生成した関数キー情報とを関数キー情報チェックルーチ
ンにより比較し、不一致が検出されるとプログラムの障
害通知を行うことを特徴とする関数インタフェースのチ
ェック方法。
1. A method for checking an interface between function parts of each program module, comprising a plurality of program modules each having a function part. Sends the function key information generated from to the function part of the receiving module to be called, and in the function module of the receiving module, checks the received function key information and the function key information generated from the receiving function name. A method for checking a function interface, comprising comparing by a routine and notifying a failure of a program when a mismatch is detected.
【請求項2】 それぞれが関数部を有する複数のプログ
ラムモジュールを備え、各プログラムモジュールの関数
部間のインタフェースをチェックする方法であって、 送信側モジュールの関数部では、関数コール時にコール
する関数のパラメータ名より生成したパラメータキー情
報をコールされる受信側モジュールの関数部に送信し、
受信側モジュールの関数部では、受信したパラメータキ
ー情報と受信側関数のパラメータ名から生成したパラメ
ータキー情報とをパラメータキー情報チェックルーチン
により比較し、不一致が検出されるとプログラムの障害
通知を行うことを特徴とする関数インタフェースのチェ
ック方法。
2. A method for checking an interface between function parts of each program module, comprising a plurality of program modules each having a function part. The parameter key information generated from the parameter name is sent to the function part of the receiving module to be called,
The function part of the receiving module compares the received parameter key information with the parameter key information generated from the parameter name of the receiving function by the parameter key information check routine, and notifies the program of a failure if a mismatch is detected. A method for checking a function interface characterized by the following.
JP09167089A 1997-06-24 1997-06-24 How to check the function interface Expired - Fee Related JP3141817B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP09167089A JP3141817B2 (en) 1997-06-24 1997-06-24 How to check the function interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP09167089A JP3141817B2 (en) 1997-06-24 1997-06-24 How to check the function interface

Publications (2)

Publication Number Publication Date
JPH1115694A JPH1115694A (en) 1999-01-22
JP3141817B2 true JP3141817B2 (en) 2001-03-07

Family

ID=15843223

Family Applications (1)

Application Number Title Priority Date Filing Date
JP09167089A Expired - Fee Related JP3141817B2 (en) 1997-06-24 1997-06-24 How to check the function interface

Country Status (1)

Country Link
JP (1) JP3141817B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5235116B2 (en) * 2008-09-16 2013-07-10 アマノ株式会社 Parking lot management system
JP5803157B2 (en) * 2011-03-07 2015-11-04 日本電気株式会社 Information processing apparatus, program fraud detection method, and program fraud detection program
JP6409638B2 (en) * 2015-03-20 2018-10-24 富士通株式会社 Compiler, compiling device, and compiling method

Also Published As

Publication number Publication date
JPH1115694A (en) 1999-01-22

Similar Documents

Publication Publication Date Title
US20070271617A1 (en) Vulnerability check program, vulnerability check apparatus, and vulnerability check method
KR101579493B1 (en) Staging control method for source code, Computer program for the same, Recording medium storing computer program for the same
US20080313602A1 (en) Bounded program failure analysis and correction
CN112230903B (en) Lightweight decoupling point burying method and device based on iOS application
CN108628739A (en) A kind of method that Lua scripts are debugged, client, server and debugger
US5606659A (en) Method and system for demounting a chain of linked processes in a distributed operating system
JP3141817B2 (en) How to check the function interface
CN110908910B (en) Block chain-based test monitoring method and device and readable storage medium
US7137041B2 (en) Methods, systems and computer program products for resolving problems in an application program utilizing a situational representation of component status
CN103645985B (en) Source code macro-pairing detection method
CN109934014B (en) Method and terminal for detecting correctness of resource file
US7500144B2 (en) Resolving problems in a business process utilizing a situational representation of component status
US10795650B2 (en) Code lineage tool
CN117520195A (en) Method, apparatus, device, storage medium and program product for testing interface
US7941708B2 (en) Error management framework
CN110597712B (en) Component attribute verification method, device, terminal and storage medium
CN110443043B (en) Vulnerability detection method and device for android application program
Affeldt et al. Formalization and verification of a mail server in Coq
US10802805B2 (en) Code lineage tool
CN118035087A (en) Fault injection optimization method and terminal
Reich Finite System Composition and Interaction.
CN109918270B (en) Multi-server system, error detection method, system, electronic device and storage medium
US20220027261A1 (en) Method and device for operating fuzz testing of a program code
CN114915549B (en) Instruction query method, device, equipment and storage medium
Burton et al. Verifying implementation relations

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071222

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081222

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091222

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091222

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101222

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees