JPH10312312A - C-language computer program inspection processing method whose operation changes according to specifications and program storage medium - Google Patents
C-language computer program inspection processing method whose operation changes according to specifications and program storage mediumInfo
- Publication number
- JPH10312312A JPH10312312A JP9122013A JP12201397A JPH10312312A JP H10312312 A JPH10312312 A JP H10312312A JP 9122013 A JP9122013 A JP 9122013A JP 12201397 A JP12201397 A JP 12201397A JP H10312312 A JPH10312312 A JP H10312312A
- Authority
- JP
- Japan
- Prior art keywords
- language
- program
- compiler
- source program
- pattern
- 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
Links
Landscapes
- Debugging And Monitoring (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
(57)【要約】
【課題】C言語で記述されたソースプログラムからコン
パイラが準拠する言語の仕様によって動作が変わる箇所
を自動的に検出または修正し,プログラムの開発を容易
にする。
【解決手段】C言語で記述されたCソースプログラム2
を入力し,例えばK&R仕様や標準C仕様等のコンパイ
ラが準拠する仕様によって動作に差異のあるパタンを,
入力したソースプログラムを解析することによって検出
する。その検出したパタンに該当するソースプログラム
が記述されているファイル名,行番号,オブジェクトを
表す名前と演算に関する情報を検出メッセージ4として
出力する。また,動作が変わらないようにソースプログ
ラムを自動修正する。
(57) [Summary] [PROBLEMS] To automatically detect or correct a part whose operation changes according to the specification of a language to which a compiler conforms from a source program described in C language, thereby facilitating program development. A C source program written in C language 2
Enter the pattern whose operation differs depending on the specification that the compiler complies with, for example, K & R specification or standard C specification.
It is detected by analyzing the input source program. A file name in which the source program corresponding to the detected pattern is described, a line number, a name representing the object, and information on the operation are output as a detection message 4. Also, the source program is automatically corrected so that the operation does not change.
Description
【0001】[0001]
【発明の属する技術分野】プログラム言語C(JIS X 30
10-1993, ISO/IEC 9899:1990)を利用して作成された計
算機プログラムの検査処理方法であって,特に,Cプロ
グラムからコンパイラが準拠するC言語の仕様によって
動作が変わる箇所を検出するC言語の計算機プログラム
検査処理方法およびそれを実現するためのプログラム記
憶媒体に関するものである。TECHNICAL FIELD The programming language C (JIS X 30
10-1993, ISO / IEC 9899: 1990) This is a check processing method for computer programs created using the C language program. The present invention relates to a computer program check processing method for a language and a program storage medium for realizing the method.
【0002】[0002]
【従来の技術】計算機プログラム言語Cには,他の言語
同様にいくつかの方言がある。伝統的な方言の一つに,
「石田晴久訳:プログラミング言語C UNIX流プロ
グラム書法と作法,共立出版,1981年」で解説されてい
るK&Rと呼ばれる仕様がある。K&R仕様によるC言
語の計算機プログラムは,永きにわたり利用され,多く
のプログラムが作られている。2. Description of the Related Art Computer programming language C has several dialects as well as other languages. In one of the traditional dialects,
There is a specification called K & R which is described in "Haruhisa Ishida: Programming language C UNIX style program writing and manners, Kyoritsu Publishing, 1981". Computer programs in the C language according to the K & R specifications have been used for many years, and many programs have been created.
【0003】一方,標準C仕様は,K&R仕様の不明確
な箇所を補充する他,これまでの仕様を改良して定めら
れた。両者の差異の内,構文規則に関する仕様は単純で
あるため,K&R仕様で作成されたプログラムを受理す
る標準C仕様準拠コンパイラは作成されてきている。し
かし,意味(動作)上の差異があることを正確に警告す
るコンパイラはなかった。[0003] On the other hand, the standard C specification is determined by supplementing unclear parts of the K & R specification and improving the conventional specifications. Among the differences between the two, the specifications relating to the syntax rules are simple, and therefore, a compiler conforming to the standard C specification has been created which accepts a program created according to the K & R specification. However, no compiler accurately warned of semantic (behavioral) differences.
【0004】[0004]
【発明が解決しようとする課題】C言語仕様の標準化に
ともない,K&R仕様準拠コンパイラだけでなく,標準
C仕様準拠コンパイラを利用できるようになってきた。
このような状況下におけるプログラムの開発において,
一方の仕様に準拠したコンパイラによってのみ意図どお
りに解釈されるプログラムを作成するという方針を採る
のが一般的であるが,準拠している仕様が異なる複数の
コンパイラによって意図どおり解釈されるようにプログ
ラムを作成したい場合がある。この場合,両者の仕様に
は意味上の違いがあるため,適切な制約の下に十分注意
してソースプログラムを作成しなければならないという
課題がある。With the standardization of the C language specification, not only a compiler conforming to the K & R specification but also a compiler conforming to the standard C specification has become available.
In developing a program under such circumstances,
It is common practice to create a program that is interpreted as intended only by a compiler that conforms to one of the specifications, but the program is designed so that conforming specifications are interpreted as intended by multiple compilers with different specifications. You may want to create In this case, since there is a semantic difference between the two specifications, there is a problem that a source program must be created with sufficient care under appropriate restrictions.
【0005】また,以前に作成したソースプログラム
を,作成した時にターゲットとしていなかった仕様に準
拠するコンパイラを利用して意図どおり動作させる場合
に,プログラムの規模が大きければなおのこと,どこを
修正すればよいかを特定することが非常に困難であっ
た。Further, when a previously created source program is operated as intended by using a compiler conforming to the specification that was not the target at the time of creation, especially when the scale of the program is large, where to modify It was very difficult to determine what was good.
【0006】本発明は上記問題点の解決を図り,C言語
で記述されたソースプログラムからコンパイラが準拠す
るC言語の仕様によって動作が変わる箇所を,自動的に
検出し,さらに動作が変わらないように修正できるなら
ば自動修正する手段を提供することを目的とする。SUMMARY OF THE INVENTION The present invention solves the above-mentioned problems, and automatically detects, from a source program written in C language, a portion where the operation changes according to the specification of the C language to which the compiler conforms, and further prevents the operation from changing. It is an object of the present invention to provide a means for automatic correction if it can be corrected.
【0007】[0007]
【課題を解決するための手段】K&R仕様書と標準C仕
様書から,構文上の差異,意味上の差異,特に整数型
(char型,short 型,int 型,long型とそれぞれの符号
無型)のオブジェクトに関して差異が生じるパタン(オ
ブジェクトに対する演算とオブジェクト間の演算)を抽
出する。該当パタンを,C言語で記述されたソースプロ
グラムから,ファイル名,行番号,オブジェクトを表す
名前と演算とで特定して検出する。[Means for Solving the Problems] Differences in syntax and semantics from K & R specifications and standard C specifications, especially integer types (char type, short type, int type, long type and their unsigned types) ), A pattern (operation for the object and operation between the objects) that causes a difference with respect to the object is extracted. The corresponding pattern is identified and detected from the source program described in the C language by a file name, a line number, a name representing an object, and an operation.
【0008】ソースプログラムからの検出を進めるに当
たり,一つのソースプログラムについてコンパイラの仕
様によって異なる解釈をしなければならない事態に陥る
ことがある。例えば,long型オブジェクトの大きさが4
バイトのとき,次のプログラム1の動作を,K&Rコン
パイラはプログラム2と同じと解釈するが,標準Cコン
パイラはプログラム3と同じと解釈する。[0008] In advance of detection from a source program, a situation may arise in which one source program must be interpreted differently depending on the specifications of the compiler. For example, if the size of a long type object is 4
When it is a byte, the K & R compiler interprets the next operation of program 1 as the same as program 2, but the standard C compiler interprets the same as program 3.
【0009】[プログラム1] #if 0xffffffff>0 f(int a){return a; } #else g(int b){return b; } #endif [プログラム2] g(int b){return b; } [プログラム3] f(int a){return a; } このようにコンパイラが準拠する仕様によって異なる解
釈が必要な場合に備えて,検査の前にどちらの仕様に従
って検出を進めるかを定めておく。[Program 1] #if 0xffffffff> 0 f (int a) {return a;} #else g (int b) {return b;} #endif [Program 2] g (int b) {return b;} [Program 3] f (int a) {return a;} In this way, in preparation for a case where a different interpretation is required depending on the specification with which the compiler conforms, it is determined according to which specification the detection should proceed before the check.
【0010】例えば,K&R仕様準拠コンパイラと標準
C仕様準拠コンパイラとで,翻訳結果のプログラムの動
作に差異があるパタンとして,ソースプログラムから抽
出するパタンは,以下のパタンである。For example, patterns extracted from a source program as patterns having a difference in the operation of a program as a result of translation between a compiler conforming to the K & R specification and a compiler conforming to the standard C specification are the following patterns.
【0011】(1) 3文字表記 例 ??= (2) entry という名前の識別子 (3) const, volatile, signed, void という名前の識別
子 (4) ブロック内での外部宣言 (5) 整数型定数の型を明示する接尾語 u, U, ul, UL, U
l, uL, lu, Lu, lU, LU (6) 浮動小数点型定数を明示する接尾語 f, F, l, L, l
f, fl, lF, Fl, Lf, fL (7) 広角文字定数,広角文字列リテラル (8) 二文字以上で構成される文字定数 (9) 文字定数 \a, \v, \", \? (ここで, \の表記は半
角の逆スラント「\」の代用である。) (10)文字列の連結 例) "abc" "def"が "abcdef" と標準C仕様では解釈す
るが,K&R仕様では文字列の連結はできない。(1) Three-letter notation Example ?? = (2) Identifier named entry (3) Identifier named const, volatile, signed, void (4) External declaration in block (5) Integer constant Suffix u, U, ul, UL, U to specify the type of
l, uL, lu, Lu, lU, LU (6) Suffixes f, F, l, L, l for specifying floating-point constants
f, fl, lF, Fl, Lf, fL (7) Wide-angle character constant, wide-angle character string literal (8) Character constant consisting of two or more characters (9) Character constant \ a, \ v, \ ", \? (Here, the notation \ is a substitute for the half-width reverse slant "\".) (10) Concatenation of character strings Example) "abc""def" is interpreted as "abcdef" in the standard C specification, but K & R Strings cannot be concatenated in the specification.
【0012】(11)unsigned short型あるいはunsigned c
har 型と符号付整数型との<,<=,>,>=,*,/
演算 (12)unsigned short型あるいはunsigned char 型と負値
の整定数との<,<=,>,>=,*,/演算 (13)231以上232未満の値をもつ整定数と符号付型との
<,<=,>,>=演算 (14)関数へのポインタ変数の宣言 (15)単項の+演算子 (16)シフト演算の左辺がlong型,unsigned long 型でな
く,右辺がlong型もしくはunsigned long 型 (17)定数式中の&&,‖,単項 &,!,キャスト演算 (18)未定義の ptrdiff_t ,size_t , wchar_t 型の
オブジェクト宣言 (19)long double 型のオブジェクト宣言 (20)関数型,配列型のオブジェクト宣言 (21)プロトタイプ宣言 (22)返す型が構造体,共用体の関数定義と呼びだし (23)初期設定付の外部変数の定義 (24)共用体の初期化 (25)自動変数として宣言されている配列,構造体,共用
体の初期化 (26)int 型でないcase名札 (27)引き数が可変個となる関数定義 (28)引き数の個数が可変個の関数の呼びだし (29)仮引き数の並びを括弧内に記した関数定義 (30)定義のない外部変数の宣言 (31) #の前に空白文字がある前処理指令行 (32)defined を含む前処理指令 (33) #elifという前処理指令 (34) #include のファイル指定にマクロが存在 (35)関数形式マクロの定義の置換の並びの中の文字,文
字列の中にマクロ引き数 (36)置換の並びの中の文字,文字列の中にマクロ引き数
がある定義をもつマクロの呼びだし (37)再帰的定義のマクロ定義 (38)再帰的定義のマクロの呼びだし (39) #,##演算子を利用したマクロ定義 (40) #,##演算子を用いたマクロの呼びだし (41)「#line 前処理字句列 改行」という形式の前処理
指令 (42)「#error 」という形式の前処理指令 (43)「#pragma 」という形式の前処理指令 (44)「# 」以外が空白という形式の前処理指令 以上の(1) 〜(44)のパタンをソースプログラムから検出
し,その検出結果を出力する。以上のパタンを検出でき
れば,コンパイラが準拠する仕様による動作の差異のた
めに予期しない動作が生じるようなことに対して,事前
に対処することができる。なお,パタンごとに検出する
かどうかを検査の前に指定させて,特定のパタンのみを
検出するようにすることもできる。検出結果に従って,
検査したソースプログラムを自動修正することも可能で
ある。(11) unsigned short type or unsigned c
<, <=,>,> =, *, / for har type and signed integer type
Operation (12) <, <=,>,> =, *, / operation between unsigned short type or unsigned char type and negative integer constant (13) Integer constant and sign with values greater than or equal to 2 31 and less than 2 32 <, <=,>,> = Operations with assigned types (14) Declaration of pointer variables to functions (15) Unary + operator (16) Right side of shift operation is not long type or unsigned long type Is a long type or unsigned long type (17) &&, ‖, unary &,! , Cast operation (18) Undefined ptrdiff_t, size_t, wchar_t type object declaration (19) Long double type object declaration (20) Function type, array type object declaration (21) Prototype declaration (22) Return type is structure (23) Definition of external variables with initialization (24) Initialization of union (25) Initialization of arrays, structures and unions declared as automatic variables (26 (27) Function definition with variable number of arguments (28) Function call with variable number of arguments (29) Function definition with parentheses in parentheses (30) ) Declaration of external variable without definition (31) Preprocessing directive line with a blank character before # (32) Preprocessing directive including defined (33) Preprocessing directive of #elif (34) File specification of #include Macro exists (35) Macro argument in character or character string in substitution list of function-form macro definition (36) Calling a macro whose definition has a macro argument in a character or character string in the permutation list (37) Macro definition of a recursive definition (38) Calling a macro of a recursive definition (39) #, ## Macro definition using operators (40) Macro call using # and ## operators (41) Preprocessing directive in the form of "#line preprocessing lexical string line feed" (42) In the form of "#error" Preprocessing directive (43) Preprocessing directive in the form of “#pragma” (44) Preprocessing directive in the form of spaces other than “#” The above patterns (1) to (44) are detected from the source program. Output the detection result. If the above pattern can be detected, it is possible to cope in advance with a situation in which an unexpected operation occurs due to a difference in operation due to a specification conforming to the compiler. In addition, whether or not to detect each pattern can be designated before the inspection so that only a specific pattern can be detected. According to the detection result,
It is also possible to automatically correct the inspected source program.
【0013】[0013]
【発明の実施の形態】図1は,本発明の概要説明図であ
る。図中,1はCPUおよびメモリ等からなる処理装
置,2は検査対象のCソースプログラム,3は検査条件
や抑止条件等の指定情報,4は検査結果の検出メッセー
ジ,5は自動修正した修正ソースプログラム,10はC
ソースプログラムからコンパイラが準拠する言語の仕様
によって動作に差異のある箇所を検出するCプログラム
検査部を表す。FIG. 1 is a schematic explanatory diagram of the present invention. In the figure, 1 is a processing device including a CPU and a memory, 2 is a C source program to be inspected, 3 is designation information such as inspection conditions and suppression conditions, 4 is a detection message of an inspection result, and 5 is a corrected source automatically corrected. Program, 10 is C
It represents a C program inspection unit that detects a part having an operation difference from a source program according to the specification of a language to which the compiler conforms.
【0014】Cプログラム検査部10は,Cソースプロ
グラム2を入力し,Cソースプログラム2の構文解析お
よび意味解析を行い,コンパイラが準拠する言語の仕様
によって動作に差異のあるパタンを検出する。このと
き,検査条件指定または抑止条件指定の指定情報3があ
れば,その条件に従って検出する。The C program checking unit 10 receives the C source program 2, performs syntax analysis and semantic analysis of the C source program 2, and detects a pattern whose operation differs depending on the specification of a language to which the compiler conforms. At this time, if there is the specification information 3 of the inspection condition specification or the suppression condition specification, it is detected according to the condition.
【0015】また,Cプログラム検査部10は,Cソー
スプログラム2中で検出したパタンの部分を,コンパイ
ラが準拠する仕様が変わっても動作が変わらない記述,
または意図した所定の動作となるような記述に自動修正
する手段を持つ。The C program checking unit 10 describes a pattern portion detected in the C source program 2 as a description whose operation does not change even if the specification with which the compiler conforms changes.
Alternatively, it has a means for automatically correcting the description so that the intended operation is performed.
【0016】図2は,本発明の実施の形態に係るモジュ
ール構成図である。図2のCプログラムチェッカ20お
よびプリプロセッサ24は,図1のCプログラム検査部
10に相当する。この例では,Cプログラムチェッカ2
0およびプリプロセッサ24は,UNIXオペレーティ
ングシステム上で動作し,ソースファイル32等からC
言語で記述されたソースプログラムを入力して構文解析
および意味解析を行い,前述したパタンを検出して,検
出結果の検出メッセージ4をファイルあるいは端末に出
力する。FIG. 2 is a module configuration diagram according to an embodiment of the present invention. The C program checker 20 and the preprocessor 24 in FIG. 2 correspond to the C program check unit 10 in FIG. In this example, C program checker 2
0 and the preprocessor 24 operate on the UNIX operating system, and
A source program described in a language is input, syntax analysis and semantic analysis are performed, the above-described pattern is detected, and a detection message 4 of a detection result is output to a file or a terminal.
【0017】Cプログラムを検査するための手段は,4
つの論理的な機能区分(カスタマイザ23,プリプロセ
ッサ24,チェッカ本体21,ポストプロセッサ22)
から構成され,カスタマイザ23,プリプロセッサ2
4,Cプログラムチェッカ20の3つのロードモジュー
ルから構成される(図2)。Means for checking a C program is as follows.
Two logical functional divisions (customizer 23, preprocessor 24, checker body 21, postprocessor 22)
, The customizer 23 and the preprocessor 2
4, and three load modules of the C program checker 20 (FIG. 2).
【0018】カスタマイザ23は,Cプログラムのチェ
ッカ起動時に一度だけ実行され,Cプログラムチェッカ
20の起動時に指定されたオプション,起動オプション
が指定されないときどのように解釈するかを記述したデ
フォルト情報ファイル30とカスタマイズファイル31
とから,カスタマイズ情報テーブルファイル35を作成
する。The customizer 23 is executed only once when the checker of the C program is started, and a default information file 30 that describes an option specified when the C program checker 20 is started and how to interpret when the start option is not specified is specified. Customize file 31
Then, the customization information table file 35 is created.
【0019】作成されたカスタマイズ情報テーブルファ
イル35には,どのケースの検査をすべきかの情報や,
sizeof(char)の値,sizeof(short) の値,sizeof(int)
の値,sizeof(long)の値,size_t , ptrdiff_t , w
char_t の型,ソースプログラムが参照するヘッダファ
イルがどのディレクトリにあるかの情報,プログラム起
動時のオプションや環境変数等を保存している。プログ
ラム起動時のオプションは,ここではUNIXのCコン
パイラに倣った内容としている。ヘッダファイル,環境
変数等についてはUNIXシステム等において知られて
いるので,ここでの詳細な説明は省略する。The created customization information table file 35 contains information on which case should be inspected,
sizeof (char) value, sizeof (short) value, sizeof (int)
Value, sizeof (long) value, size_t, ptrdiff_t, w
It stores the type of char_t, information on the directory in which the header file referenced by the source program is located, options when starting the program, environment variables, and the like. Here, the options at the time of starting the program have contents similar to those of the UNIX C compiler. Header files, environment variables, and the like are known in UNIX systems and the like, and thus detailed descriptions thereof will be omitted.
【0020】プリプロセッサ24は,ソースファイル3
2,プロトタイプファイル33,マクロ定義ファイル3
4を読み込み,Cソースプログラムの中に記述されてい
る#から始まる行(行制御,ファイル取り込み,マクロ
定義)とマクロの展開を行い,前記パタンに該当する箇
所が見つかれば,エラーファイル37に出力し,マクロ
展開した内容をチェッカ本体21が読むように出力す
る。このファイルを図2では中間ファイル36として示
している。The preprocessor 24 has a source file 3
2, prototype file 33, macro definition file 3
4 is read, and lines starting with # (line control, file import, macro definition) and macro expansion described in the C source program are expanded, and if a portion corresponding to the above pattern is found, it is output to the error file 37. Then, the contents of the macro expansion are output so that the checker body 21 reads them. This file is shown as an intermediate file 36 in FIG.
【0021】チェッカ本体21は,プリプロセッサ24
の出力した中間ファイル36を読み込んで,構文解析,
意味解析を行い,前記パタンに該当する箇所が見つかれ
ば,その情報をエラーファイル37に出力する。The checker body 21 includes a preprocessor 24
Reads the intermediate file 36 output by
A semantic analysis is performed, and if a portion corresponding to the pattern is found, the information is output to the error file 37.
【0022】ポストプロセッサ22は,プリプロセッサ
24およびチェッカ本体21によってエラーファイル3
7に出力された内容をマージし,カスタマイズ情報テー
ブルファイル35に記述された内容に従って編集して,
それらを検出メッセージ4として出力する。また,カス
タマイズ情報テーブルファイル35に記述された内容に
従って,整数型のオブジェクトの大きさが変わっても動
作が変わらないようにソースプログラムを修正できる場
合には自動修正して,その修正結果を修正ソースファイ
ル40に出力する。The post-processor 22 uses the pre-processor 24 and the checker body 21 to execute the error file 3
7 are merged, edited according to the contents described in the customization information table file 35,
These are output as a detection message 4. If the source program can be corrected according to the contents described in the customization information table file 35 so that the operation does not change even if the size of the integer type object changes, the correction result is automatically corrected and the correction result is corrected. Output to file 40.
【0023】以上のように各モジュールが順に動作し,
作成したCソースプログラムを格納したソースファイル
32を読み込んで,前記パタンに一致する箇所をそのフ
ァイル名と行番号,パタンとそれの構成要素である識別
子あるいは整定数を含んで検出する。As described above, each module operates in order,
The source file 32 storing the created C source program is read, and the location that matches the pattern is detected, including the file name and line number, the pattern and its constituent identifiers or integer constants.
【0024】以上の処理において補助的に用いられるフ
ァイルについて簡単に説明する。カスタマイズファイル
31は,Cプログラムチェッカの起動時に指定できるオ
プションが指定されなかった場合にどのような解釈をす
るかを記述したファイルである。The files used as auxiliary in the above processing will be briefly described. The customization file 31 is a file describing how to interpret when an option that can be specified when the C program checker is started is not specified.
【0025】デフォルト情報ファイル30は,Cプログ
ラムチェッカ20の起動時のオプションで指定しない情
報について指定するファイルであり,例えば,マクロや
型をソースプログラムで定義されているのと同様に定義
する。これはCコンパイラが内部で定義しているプロセ
ッサやオペレーティング・システム(OS)の名前をも
つ識別子を,Cプログラムチェッカ20が倣って定義す
るために利用する。The default information file 30 is a file for specifying information that is not specified by an option when the C program checker 20 is started, and defines, for example, macros and types in the same manner as defined in the source program. This is used by the C program checker 20 to define an identifier having the name of the processor or operating system (OS) defined internally by the C compiler.
【0026】メッセージファイル38は,Cプログラム
チェッカ20が出力するメッセージの雛型(出力時に埋
めるファイル名,行番号,オブジェクト名を除いたメッ
セージ等)を格納しているファイルである。The message file 38 is a file that stores a template of a message output by the C program checker 20 (a message excluding a file name, a line number, and an object name to be filled at the time of output).
【0027】演算結果ファイル39は,次のようなもの
である。C言語ではint 型より大きさが小さい整数型の
オブジェクトは,演算する場合に一度int 型またはunsi
gned型に変換されてから演算される(この変換をプロモ
ーションと呼ぶ)。この変換は,ケースに依存する。例
えば,sizeof(int) =4,sizeof(short) =2のとき,
K&Rであればunsigned short型はunsigned型に変換さ
れてから演算されるが,標準Cのときには,int 型に変
換されてから演算される。演算結果ファイル39は,こ
の処理のためのもので,各型のオブジェクトが各ケース
のときにどの型に変換されるかを記述して保存している
ものである。The operation result file 39 is as follows. In the C language, an integer-type object smaller than the int type is once treated as an int or unsi
It is operated after being converted to gned type (this conversion is called promotion). This transformation depends on the case. For example, when sizeof (int) = 4 and sizeof (short) = 2,
In the case of K & R, the operation is performed after the unsigned short type is converted to the unsigned type. In the case of the standard C, the operation is performed after being converted to the int type. The calculation result file 39 is used for this processing, and describes and saves to which type each type of object is converted in each case.
【0028】カスタマイズ情報テーブルファイル35
は,カスタマイズファイル31と起動オプションとを解
析して編集したファイルである。中間ファイル36は,
プロプロセッサ24が#includeや#define,マクロの展開
を行った結果と定義されているシンボル一覧を出力する
ファイルである。Customization information table file 35
Is a file edited by analyzing the customization file 31 and the startup options. The intermediate file 36 is
This is a file that outputs a result of expansion of #include, #define, and macro by the proprocessor 24 and a list of defined symbols.
【0029】エラーファイル37は,プリプロセッサ2
4,チェッカ本体21が検出した内容を一旦保持してお
くファイルである。シンボルテーブル50〜52は,プ
ログラム中のシンボル情報を記憶するテーブルであり,
トークンテーブル53は,プログラム中で括弧やコロン
等の区切り記号で区切られた単位の情報を記憶するテー
ブルである。The error file 37 is stored in the preprocessor 2
4, a file for temporarily storing the content detected by the checker main body 21; The symbol tables 50 to 52 are tables for storing symbol information in the program.
The token table 53 is a table that stores information of units delimited by delimiters such as parentheses and colons in a program.
【0030】一般にCプログラムの開発では,下記のケ
ースのいずれかを開発条件とすることが多い。 [ケース1] コンパイラの仕様としてK&Rのみ [ケース2] コンパイラの仕様として標準C(ANS
I)のみ [ケース3] コンパイラの仕様としてK&Rと標準C
(ANSI) また,char型の値の範囲についても開発条件としてい
る。In general, in developing a C program, one of the following cases is often used as a development condition. [Case 1] K & R only as a compiler specification [Case 2] Standard C (ANS
I) only [Case 3] K & R and standard C as compiler specifications
(ANSI) The range of char type values is also a development condition.
【0031】そこで,以上のような各種の開発条件に対
応した検査を可能とするために,Cプログラムチェッカ
20に対して,検査条件を指定することができる。図3
は,検査条件指定の説明図である。Therefore, in order to enable the inspection corresponding to the various development conditions as described above, the inspection condition can be designated to the C program checker 20. FIG.
FIG. 4 is an explanatory diagram of designation of inspection conditions.
【0032】図3(A)は,コンパイラが準拠する仕様
に関する選択肢であり,検査者は「K&Rのみ」,「A
NSIのみ」,「K&RとANSI」の3つの選択肢の
中からどれかを指定することができる。また,図3
(B)は,char型の値の範囲に関する選択肢であり,
「非負のみ」,「負もある」,「どれでも」の中から検
索条件を指定することができる。ここで,「K&RとA
NSI」および「どれでも」という条件が含まれる場合
には,いくつかの環境で検査対象のプログラムを動作さ
せたいというプログラム開発者の意思がある。そこで,
これらを含む条件の場合に動作が変わる箇所をプログラ
ムから検出する。FIG. 3A shows options regarding specifications to be complied with by the compiler.
Any of three options, "NSI only" and "K & R and ANSI" can be designated. Also, FIG.
(B) is a choice regarding the range of the char type value.
The search condition can be specified from "only non-negative", "some negative", and "any". Here, "K & R and A
If the conditions of "NSI" and "any" are included, there is an intention of the program developer to operate the program to be inspected in some environments. Therefore,
The location where the operation changes under the conditions including these is detected from the program.
【0033】検査条件は,図3(A),(B)のそれぞ
れの場合の積だけ存在することになるので,検査条件
は,3×3=9通りあることになる。また,不要な検出
メッセージ4を出力しないようにするため,または不要
な自動修正をしないようにするため,Cプログラムチェ
ッカ20に対して,抑止条件を指定することもできる。
抑止条件の対象としては,ファイルとパタンを選択する
ことができ,対象ファイルの指定では,前述したパタン
があっても検出しないファイルおよびプログラムの行を
指定することができる。対象パタンの指定では,前述し
た(1) 〜(44)のパタンのうち,検出を抑止するパタンを
指定することができる。Since there are only the inspection conditions corresponding to the product in each of FIGS. 3A and 3B, there are 3 × 3 = 9 inspection conditions. Further, in order to prevent the unnecessary detection message 4 from being output or unnecessary unnecessary automatic correction, it is possible to specify a suppression condition for the C program checker 20.
A file and a pattern can be selected as a target of the suppression condition. In the specification of the target file, a line of a file and a program that is not detected even if the pattern is present can be specified. In the specification of the target pattern, of the patterns (1) to (44) described above, a pattern for which detection is to be suppressed can be specified.
【0034】次に検査後の自動修正の例について説明す
る。図4は,Cソースプログラムについての自動修正の
例を示している。例えば検査対象が,図4に示すような
Cソースプログラム2であったとする。ここで,K&R
仕様とANSI仕様とで動作を変えたくないものとす
る。Next, an example of automatic correction after inspection will be described. FIG. 4 shows an example of automatic correction for a C source program. For example, assume that the inspection target is a C source program 2 as shown in FIG. Where K & R
It is assumed that it is not desired to change the operation between the specification and the ANSI specification.
【0035】このCソースプログラム2について,前述
したパタン抽出を行うと「(11)unsigned short型あるい
はunsigned char 型と符号付整数型との<,<=,>,
>=,*,/演算」のパタンが該当する。With respect to the C source program 2, when the above-described pattern extraction is performed, "(11) unsigned short type or unsigned char type and signed integer type <, <=,>,
> =, *, / Operation ”.
【0036】このプログラムでは,「i<us」の部分(i
とusの値の比較結果) がK&R仕様とANSI仕様とで
変わる。これは,K&R仕様では,unsigned short型の
プロモーション後の型がunsigned型であるのに対し,A
NSI仕様では,int 型であることに起因する。そこ
で,K&R仕様でもANSI仕様でも動作が変わらない
ようにするには,図4に示すような修正ソースプログラ
ム5に修正すればよい。すなわち,動作の差異をなくす
ために,「i<(int)us 」のように大小比較する変数の型
を予め整合させる。このような自動修正は,前記パタン
に対応したルーチンを用意することにより実現すること
ができる。In this program, the "i <us" portion (i
And the value of us) change between the K & R specification and the ANSI specification. This is because, in the K & R specification, the type after promotion of unsigned short type is unsigned type, whereas A
This is due to the int type in the NSI specification. Therefore, in order to prevent the operation from changing between the K & R specification and the ANSI specification, it is necessary to modify the modified source program 5 as shown in FIG. That is, in order to eliminate the difference in operation, the types of variables to be compared in magnitude, such as “i <(int) us”, are previously matched. Such automatic correction can be realized by preparing a routine corresponding to the pattern.
【0037】なお,図4に示すCソースプログラム2に
対する検査結果の出力は,例えば「ファイル名:行:i
とusとはK&R/ANSI依存」というような検出メ
ッセージであり,自動修正を行わない場合でも,この検
出メッセージによってプログラム開発者に注意を促すこ
とができる。The output of the inspection result for the C source program 2 shown in FIG. 4 is, for example, "file name: line: i
And us are K & R / ANSI-dependent messages. Even if automatic correction is not performed, the detection message can alert the program developer.
【0038】この検出メッセージにおいて,「ファイル
名」の部分には,このCソースプログラム2が格納され
ているファイルのファイル名,「行」の部分には「i<u
s」が記述されている行の行番号が埋め込まれる。In the detection message, the "file name" part is the file name of the file storing the C source program 2, and the "line" part is "i <u".
The line number of the line in which "s" is described is embedded.
【0039】図5は,図2に示すプリプロセッサ24の
フローチャートである。プリプロセッサ24は,まずス
テップS1では,エラー中断時に制御を移すべき処理の
登録を行う。次に,環境変数,起動オプションの取得を
行い,内部テーブルに設定する(S2)。さらに,トー
クンテーブルの初期化,シンボルテーブルの初期化を行
い(S3,S4),続いてカスタマイズ情報の取得およ
びカスタマイズ情報テーブルファイル35への初期化を
行う(S5)。また,マクロ定義ファイル34およびプ
ロトタイプファイル33の読み込みを行い,内部への初
期化を行う(S6)。FIG. 5 is a flowchart of the preprocessor 24 shown in FIG. First, in step S1, the preprocessor 24 registers a process to which control is transferred when an error is interrupted. Next, environment variables and startup options are acquired and set in the internal table (S2). Further, the token table and the symbol table are initialized (S3, S4), and then the customization information is obtained and the customization information table file 35 is initialized (S5). Further, the macro definition file 34 and the prototype file 33 are read, and internal initialization is performed (S6).
【0040】以上の初期化処理の後,ステップS7で
は,ソースファイル32から順次,検査対象のプログラ
ムを読み込む。ステップS8の判定により「#」から始
まる行のときは,ステップS9へ進み。次の前処理指令
かを判断する。After the above initialization processing, in step S7, the programs to be inspected are sequentially read from the source file 32. If it is determined in step S8 that the line starts with “#”, the process proceeds to step S9. Determine whether it is the next preprocessing command.
【0041】#if,#ifdef,#ifndef,#elif,#endif,#else,
#include,#define,#line,#error,#pragma,#ident このいずれかであれば,その前処理指令に対応した処理
を行い(S10),検出パタンに一致するかどうかを判
定する(S11)。検出パタンに一致しなければ,ステ
ップS7へ戻る。検出パタンに一致すれば,診断メッセ
ージをエラーファイル37へ出力し(S12),その
後,ステップS7へ戻る。# If, # ifdef, # ifndef, # elif, # endif, # else,
# include, # define, # line, # error, # pragma, # ident If any of these, the processing corresponding to the preprocessing instruction is performed (S10), and it is determined whether or not the pattern matches the detection pattern (S11). ). If it does not match the detection pattern, the process returns to step S7. If it matches the detection pattern, a diagnostic message is output to the error file 37 (S12), and the process returns to step S7.
【0042】ステップS9で前処理指令でないと判断し
た場合には,構文エラーのメッセージを出力し(S1
3),エラーとして中断処理へ移り(S14),処理を
終了する。If it is determined in step S9 that the command is not a preprocessing command, a syntax error message is output (S1).
3) As an error, the process proceeds to the interruption process (S14), and the process ends.
【0043】ステップS8の判定で「#」から始まる行
ではない場合,ステップS15へ進み,通常のコンパイ
ラ等で行われているように,トークンテーブルへの出
力,シンボルテーブルへの出力を行い(S15,S1
6),それらを中間ファイル36へ出力する(S1
7)。以上の処理(S7〜S17)をソースファイル3
2が尽きるまで行い(S18),ソースファイル32が
尽きたら,チェッカ本体21を起動する(S19)。If it is determined in step S8 that the line does not start with "#", the flow advances to step S15 to perform output to the token table and output to the symbol table as performed by a normal compiler or the like (S15). , S1
6), and output them to the intermediate file 36 (S1)
7). The above processing (S7 to S17) is performed using the source file 3
2 is exhausted (S18), and when the source file 32 is exhausted, the checker main body 21 is started (S19).
【0044】図6は,図2に示すチェッカ本体21のフ
ローチャートである。チェッカ本体21は,プリプロセ
ッサ24と同様に,まずステップS21では,エラー中
断時に制御を移すべき処理の登録を行う。次に,環境変
数,起動オプションの取得を行い,内部テーブルに設定
する(S22)。次に,トークンテーブルの読み込み
(S23),シンボルテーブルの読み込み(S24)を
行い,続いてカスタマイズ情報の取得および内部への初
期化を行う(S25)。FIG. 6 is a flowchart of the checker body 21 shown in FIG. As in the preprocessor 24, the checker main body 21 first registers a process to which control is transferred when an error is interrupted in step S21. Next, environment variables and start options are acquired and set in the internal table (S22). Next, a token table is read (S23), a symbol table is read (S24), and then customization information is acquired and initialized internally (S25).
【0045】以上の初期化処理の後,ステップS26で
は,プリプロセッサ24の出力を読み込む。それを構文
解析し,内部で構文木を生成する(S27)。そして,
構文木と検出パタンとが一致するかどうかを調べ(S2
8),一致する場合には,診断メッセージをエラーファ
イル37へ出力する(S29)。After the above initialization processing, in step S26, the output of the preprocessor 24 is read. The syntax is analyzed and a syntax tree is generated internally (S27). And
It is checked whether the parse tree matches the detection pattern (S2
8) If they match, a diagnostic message is output to the error file 37 (S29).
【0046】次に意味解析し,文を所定の内部形式に変
換する(S30)。なお,構文解析,意味解析等の処理
は,通常のコンパイラで行われている処理と同様である
ので,ここでの詳しい説明は省略する。Next, the sentence is analyzed to convert the sentence into a predetermined internal format (S30). Processing such as syntax analysis and semantic analysis is the same as the processing performed by a normal compiler, and a detailed description thereof will be omitted.
【0047】文を内部形式に変換した後,その内部形式
と検出パタンとが一致するかどうを調べる(S31)。
一致する場合には,診断メッセージをエラーファイル3
7へ出力する(S32)。After the sentence is converted into the internal format, it is checked whether or not the internal format matches the detection pattern (S31).
If they match, a diagnostic message is sent to error file 3
7 (S32).
【0048】以上の処理(S26〜S32)をプリプロ
セッサ24の出力ファイルが尽きるまで行い(S3
3),出力ファイルが尽きたら,ポストプロセッサを起
動する(S34)。The above processing (S26 to S32) is performed until the output files of the preprocessor 24 are exhausted (S3).
3) When the output files run out, the post processor is started (S34).
【0049】図7は,図2に示すポストプロセッサ22
のフローチャートである。ポストプロセッサ22は,ま
ずステップS41でカスタマイズ情報テーブルファイル
35の読み込みを行う。次に,エラーファイル37の読
み込みを行い(S42),読み込んだエラーファイル3
7の内容の診断メッセージを診断対象となったファイ
ル,行の順に並べかえ,中間ファイルを作成する(S4
3)。FIG. 7 shows the post processor 22 shown in FIG.
It is a flowchart of FIG. The post processor 22 first reads the customization information table file 35 in step S41. Next, the error file 37 is read (S42), and the read error file 3 is read.
The diagnostic messages having the contents of No. 7 are rearranged in the order of the file to be diagnosed and the line, and an intermediate file is created (S4).
3).
【0050】次に,作成した中間ファイルから,抑止条
件指定により抑止対象となっている診断メッセージを削
除し,中間ファイルを更新する(S44)。また,この
中間ファイルの内容で,抑止対象となっている診断対象
ファイルに関する診断メッセージを削除する(S4
5)。Next, from the created intermediate file, the diagnostic message to be inhibited by the inhibition condition designation is deleted, and the intermediate file is updated (S44). In addition, a diagnostic message relating to the diagnostic target file to be suppressed is deleted from the contents of the intermediate file (S4).
5).
【0051】残った中間ファイルの内容を検出メッセー
ジ4として,プリンタ,ディスプレイ,ファイル等の出
力装置に出力する(S46)。また,利用者からの指定
と検出結果とに応じて,自動修正が可能であれば,図4
で説明したようなプログラムの自動修正を行い,処理を
終了する。The content of the remaining intermediate file is output as a detection message 4 to an output device such as a printer, a display, or a file (S46). If automatic correction is possible according to the specification from the user and the detection result, FIG.
The program is automatically corrected as described above, and the process ends.
【0052】[0052]
【実施例】以上のCプログラムチェッカにより,約15
M(千五百万)行のCソースプログラムを調査したとこ
ろ,凡そ10K(一万)行に1箇所の割合でK&Rと標
準Cとで動作が変わる箇所が発見できた。[Embodiment] By using the above C program checker, about 15
Investigation of the M (15 million) lines of C source programs revealed that approximately 10K (10,000) lines had a change in operation between K & R and standard C at a rate of one place.
【0053】[0053]
【発明の効果】以上説明したように,本発明によれば,
コンパイラが準拠する言語の仕様が異なるため,コンパ
イル結果のプログラムの動作が変わる箇所を,自動的に
検出することができるので,各種のコンパイラに応じた
プログラムの開発が容易になり,動作誤りを未然に防止
することが可能になる。さらに,自動修正機能を設ける
ことによって,より一層の労力の軽減および信頼性の向
上が可能になる。As described above, according to the present invention,
Because the specification of the language to which the compiler conforms is different, it is possible to automatically detect the part where the operation of the program as a result of the compilation changes, so that it is easy to develop the program according to various compilers and to prevent the operation error. Can be prevented. Further, by providing the automatic correction function, it is possible to further reduce labor and improve reliability.
【図1】本発明の概要説明図である。FIG. 1 is a schematic explanatory diagram of the present invention.
【図2】本発明の実施の形態に係るモジュール構成図で
ある。FIG. 2 is a module configuration diagram according to the embodiment of the present invention.
【図3】検査条件指定の説明図である。FIG. 3 is an explanatory diagram of inspection condition designation.
【図4】Cソースプログラムについての自動修正の例を
示す図である。FIG. 4 is a diagram illustrating an example of automatic correction of a C source program.
【図5】プリプロセッサのフローチャートである。FIG. 5 is a flowchart of a preprocessor.
【図6】チェッカ本体のフローチャートである。FIG. 6 is a flowchart of a checker main body.
【図7】ポストプロセッサのフローチャートである。FIG. 7 is a flowchart of a post processor.
1 処理装置 2 Cソースプログラム 3 指定情報 4 検出メッセージ 5 修正ソースプログラム 10 Cプログラム検査部 DESCRIPTION OF SYMBOLS 1 Processing unit 2 C source program 3 Specification information 4 Detection message 5 Corrected source program 10 C program inspection unit
Claims (5)
作成された計算機プログラムからコンパイラが準拠する
C言語の仕様によって動作が変わる箇所を検出する処理
方法であって,C言語で記述されたソースプログラムを
入力する過程と,コンパイラが準拠するC言語の仕様に
よって動作に差異があるパタンを,入力したソースプロ
グラムから検出する過程と,前記検出したパタンに該当
するソースプログラム情報を出力する過程とを有するこ
とを特徴とする仕様によって動作が変わるC言語の計算
機プログラム検査処理方法。1. A processing method for detecting, from a computer program created by using a C language, which is a programming language, a portion whose operation changes according to a specification of a C language to which a compiler conforms, comprising: A process of inputting a program, a process of detecting, from the input source program, a pattern whose operation differs depending on the specification of the C language to which the compiler conforms, and a process of outputting source program information corresponding to the detected pattern A computer program inspection processing method in C language, the operation of which changes according to specifications.
の仕様に準拠したコンパイラで動作が変わるパタンをソ
ースプログラムから検出する場合に,第1の仕様または
第2の仕様のどちらか一方に指定して検査を進めること
を特徴とする請求項1記載の仕様によって動作が変わる
C言語の計算機プログラム検査処理方法。2. A compiler conforming to a first specification and a second compiler
2. The method according to claim 1, wherein when a pattern whose operation is changed by a compiler conforming to the specification is detected from the source program, the inspection is performed by specifying one of the first specification and the second specification. C language computer program inspection processing method whose operation changes according to specifications.
定を検査の前に入力する過程と,指定されたパタンにつ
いてのみ検出した結果を出力する過程とを有することを
特徴とする請求項1記載の仕様によって動作が変わるC
言語の計算機プログラム検査処理方法。3. The method according to claim 1, further comprising: a step of inputting a designation of whether or not to detect each pattern before the inspection, and a step of outputting a detection result of only the specified pattern. The operation changes according to the specifications of C
Language computer program inspection processing method.
作成された計算機プログラムからコンパイラが準拠する
C言語の仕様によって動作が変わる箇所を検出する処理
方法であって,C言語で記述されたソースプログラムを
入力する過程と,コンパイラが準拠するC言語の仕様に
よって動作に差異があるパタンを,入力したソースプロ
グラムから検出する過程と,前記検出したパタンに該当
するソースプログラムを,コンパイラが準拠するC言語
の仕様が変わっても動作が変わらないかまたは所定の動
作となるように自動修正する過程とを有することを特徴
とする仕様によって動作が変わるC言語の計算機プログ
ラム検査処理方法。4. A processing method for detecting, from a computer program created using a C language, which is a programming language, a portion whose operation changes according to a specification of a C language to which a compiler conforms, wherein a source written in the C language is used. A process of inputting a program, a process of detecting, from the input source program, a pattern whose operation differs depending on the specification of the C language to which the compiler conforms, and a process of detecting a source program corresponding to the detected pattern in a C language conforming to the compiler. Automatically changing the operation so that the operation does not change or become a predetermined operation even if the language specification changes. C language computer program inspection processing method, the operation of which changes according to the specification.
作成された計算機プログラムからコンパイラが準拠する
C言語の仕様によって動作が変わる箇所を検出するため
のプログラムを格納した計算機読み取り可能な記憶媒体
であって,C言語で記述されたソースプログラムを入力
する手順と,コンパイラが準拠するC言語の仕様によっ
て動作に差異があるパタンを,入力したソースプログラ
ムから検出する手順と,前記検出したパタンに該当する
ソースプログラムの情報を出力する,またはそのソース
プログラムを,コンパイラが準拠するC言語の仕様が変
わっても動作が変わらないかもしくは所定の動作となる
ように自動修正する手順とを計算機に実行させるプログ
ラムを格納したことを特徴とするプログラム記憶媒体。5. A computer-readable storage medium which stores a program for detecting a portion where an operation changes according to a specification of a C language conforming to a compiler from a computer program created using a C language which is a programming language. A procedure for inputting a source program described in C language, a procedure for detecting a pattern whose operation differs depending on the specification of the C language to which the compiler conforms from the input source program, and a procedure corresponding to the detected pattern. Output the information of the source program to be executed, or automatically execute the procedure of automatically modifying the source program so that the operation does not change or the predetermined operation is performed even if the specification of the C language to which the compiler conforms changes. A program storage medium storing a program.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP9122013A JPH10312312A (en) | 1997-05-13 | 1997-05-13 | C-language computer program inspection processing method whose operation changes according to specifications and program storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP9122013A JPH10312312A (en) | 1997-05-13 | 1997-05-13 | C-language computer program inspection processing method whose operation changes according to specifications and program storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH10312312A true JPH10312312A (en) | 1998-11-24 |
Family
ID=14825423
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP9122013A Pending JPH10312312A (en) | 1997-05-13 | 1997-05-13 | C-language computer program inspection processing method whose operation changes according to specifications and program storage medium |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH10312312A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014016914A (en) * | 2012-07-11 | 2014-01-30 | Fujitsu Ltd | Extended language specification information providing method, extended language specification information providing program, and compiling device |
| CN115617352A (en) * | 2022-12-02 | 2023-01-17 | 中汽研软件测评(天津)有限公司 | C code detection method, equipment and storage medium based on safety coding standard |
-
1997
- 1997-05-13 JP JP9122013A patent/JPH10312312A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014016914A (en) * | 2012-07-11 | 2014-01-30 | Fujitsu Ltd | Extended language specification information providing method, extended language specification information providing program, and compiling device |
| CN115617352A (en) * | 2022-12-02 | 2023-01-17 | 中汽研软件测评(天津)有限公司 | C code detection method, equipment and storage medium based on safety coding standard |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7757225B2 (en) | Linktime recognition of alternative implementations of programmed functionality | |
| US6901579B1 (en) | Generation of source code from classes and maintaining the comment that indicates the role of the class in the generated source code | |
| US5761510A (en) | Method for error identification in a program interface | |
| US7568196B2 (en) | Initializing virtual machine that subsequently executes application | |
| US6317873B1 (en) | Assembly language translator | |
| CN102365621A (en) | Interpreter-based program language translator using embedded interpreter types and variables | |
| US8201143B2 (en) | Dynamic mating of a modified user interface with pre-modified user interface code library | |
| JP2002196937A (en) | Method of compiling assembly language code for an instruction set architecture including new instructions using conventional assembler | |
| US8082542B2 (en) | Load time in-lining of subroutines | |
| CN114489653A (en) | Compiler-based data processing method, compiler-based data processing device and readable storage medium | |
| US6381736B1 (en) | Method for compile-time type-checking of arguments for externally-specified format strings | |
| US6625807B1 (en) | Apparatus and method for efficiently obtaining and utilizing register usage information during software binary translation | |
| US20020049698A1 (en) | Programming supporting method and programming support device | |
| US20050172276A1 (en) | XML-based preprocessor | |
| KR20090011974A (en) | How to Extract Compile Target Files | |
| US5581769A (en) | Multipurpose program object linkage protocol for upward compatibility among different compilers | |
| JP3300090B2 (en) | Test program execution method | |
| US6976249B1 (en) | Method for embedding object codes in source codes | |
| EP0731409A1 (en) | Method and apparatus for computer code processing in a code translator | |
| JPH10312312A (en) | C-language computer program inspection processing method whose operation changes according to specifications and program storage medium | |
| JPH10312313A (en) | C language computer program inspection processing method and program storage medium | |
| CN118113291B (en) | A memory security management method and device | |
| JPH10307735A (en) | Computer program inspection processing method and program storage medium for C ++ language | |
| JP3327662B2 (en) | Program translation device and program translation method | |
| JP2621555B2 (en) | Vectorization processing method |