JP3458796B2 - Interruption instruction check device and recording medium - Google Patents

Interruption instruction check device and recording medium

Info

Publication number
JP3458796B2
JP3458796B2 JP29558799A JP29558799A JP3458796B2 JP 3458796 B2 JP3458796 B2 JP 3458796B2 JP 29558799 A JP29558799 A JP 29558799A JP 29558799 A JP29558799 A JP 29558799A JP 3458796 B2 JP3458796 B2 JP 3458796B2
Authority
JP
Japan
Prior art keywords
interrupt
program
processing
instruction
execution priority
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
JP29558799A
Other languages
Japanese (ja)
Other versions
JP2001117791A (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.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP29558799A priority Critical patent/JP3458796B2/en
Publication of JP2001117791A publication Critical patent/JP2001117791A/en
Application granted granted Critical
Publication of JP3458796B2 publication Critical patent/JP3458796B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • 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 technique for checking an interrupt prohibition / permission command described in a processing program for executing an interrupt process.

【0002】[0002]

【従来の技術】例えば車両に搭載される電子制御装置
(以下「ECU」という。)に用いられる制御プログラ
ムでは、制御応答性や安全性の確保等から所定の処理を
リアルタイムに実行する必要性がある。そのため、この
ようなリアルタイム性を必要とする処理(リアルタイム
処理)は、メインルーチンとは別の割込ルーチンとして
用意されるのが一般的である。割り込みルーチンは、例
えばイベントの発生等をトリガとしてメインルーチンの
実行中に優先して実行される。優先して実行されると
は、割込ルーチンの実行により一時的にメインルーチン
の実行が中断され、割込ルーチン終了後に、再びその中
断位置からメインルーチンが実行されることをいう。
2. Description of the Related Art For example, in a control program used in an electronic control unit (hereinafter referred to as "ECU") mounted on a vehicle, it is necessary to execute a predetermined process in real time in order to ensure control responsiveness and safety. is there. Therefore, such processing requiring real-time processing (real-time processing) is generally prepared as an interrupt routine different from the main routine. The interrupt routine is preferentially executed during execution of the main routine, for example, triggered by the occurrence of an event. The priority execution means that the execution of the main routine is temporarily interrupted by the execution of the interrupt routine, and after the interrupt routine ends, the main routine is executed again from the interrupted position.

【0003】近年では、上述したECUの制御プログラ
ムもOS(オペレーティング・システム)上で動作する
ようになっており、メインルーチンや割込ルーチン等の
実行状態がタスクと呼ばれ、OSにより管理されてい
る。このタスクには実行優先順位を示すレベル(タスク
レベル)が設定されており、このタスクレベルに基づい
て上述したような割込処理を実現している。つまり、O
Sの管理の下、相対的にレベルの高いタスクである上位
タスクは、相対的にレベルの低いタスクである下位タス
クに優先する(割り込む)。上述した例で言えば、メイ
ンルーチンによる処理が下位タスクに相当し、割込ルー
チンによる処理が上位タスクに相当する。
In recent years, the control program of the above-mentioned ECU also operates on an OS (operating system), and the execution states of the main routine, interrupt routine, etc. are called tasks and are managed by the OS. There is. A level (task level) indicating the execution priority is set for this task, and the interrupt processing as described above is realized based on this task level. That is, O
Under the control of S, the higher-level task, which is a relatively high-level task, has priority (interrupts) over the lower-level task, which is a relatively low-level task. In the example described above, the process by the main routine corresponds to the lower task, and the process by the interrupt routine corresponds to the upper task.

【0004】このようなタスク概念の導入は、タスクレ
ベルを設定するという極めて簡単な情報記述だけで何等
プログラム間の実行タイミング等を記述する必要をなく
し、割込処理の設計を容易にした。一方、イベント発生
というような、下位タスクの処理タイミングに関係しな
いタイミングで、上位タスクが割り込む。そのため、下
位タスクに不具合が生じる可能性がある。ここで、上位
タスクの割り込みによって生じる不具合について1つの
ケースを説明する。
The introduction of such a task concept eliminates the need to describe the execution timing between programs just by extremely simple information description of setting a task level, and facilitates the design of interrupt processing. On the other hand, the upper task interrupts at a timing that is not related to the processing timing of the lower task, such as the occurrence of an event. Therefore, a problem may occur in the lower task. Here, one case will be described regarding a problem caused by an interrupt of a higher-level task.

【0005】例えば上位タスクと下位タスクとで共通の
変数を操作する場合を考える。この共通の変数は、例え
ばプログラム全体が複数の関数にて構成されていると
き、これら関数間で共通にアクセスできる記憶領域に記
憶されるものであり、グローバル変数(大域変数)と呼
ばれる。このとき、下位タスクは、2つの処理ステップ
A,Bにてこの変数を2回読み出すものとし、2つの処
理ステップA,Bにて読み出される変数が同一値である
ことを前提とした処理を実行する。一方、上位タスク
は、処理ステップCにてこの変数を書き換える。このよ
うな前提の下、下位タスクの処理ステップAが実行され
た後、上位タスクが割り込むと処理ステップCにて変数
値が書き換えられてしまい、その後、処理ステップBに
て読み出される変数値が処理ステップAにて読み出され
た変数値と変わってくるという事態が生じる。
Consider, for example, the case where a common variable is operated by the upper task and the lower task. This common variable is stored in a storage area that can be commonly accessed by these functions when the entire program is composed of a plurality of functions, for example, and is called a global variable (global variable). At this time, the lower-level task reads this variable twice in the two processing steps A and B, and executes the processing assuming that the variables read in the two processing steps A and B have the same value. To do. On the other hand, the upper task rewrites this variable in processing step C. Under such a premise, after the processing step A of the lower task is executed, when the upper task interrupts, the variable value is rewritten in the processing step C, and then the variable value read in the processing step B is processed. A situation occurs in which the variable value read in step A changes.

【0006】そのため、下位タスクのプログラム中に
は、必要に応じて割込禁止/許可命令を記述することが
不可欠である。割込禁止命令は、上位タスクの割り込み
を禁止するものであり、割込許可命令は上位タスクの割
り込みを許可するものである。つまり、割込禁止命令と
割込許可命令で挟まれた処理ステップの途中では、上位
タスクは割り込めない。したがって、上述したケースで
は、下位タスクのプログラム中の処理ステップAの前に
割込禁止命令を記述し、処理ステップBの後に割込許可
命令を記述する。このようにすれば、割込禁止命令と割
込許可命令とで挟まれた処理ステップAからBまでの処
理の途中で上位タスクが割り込むことがないため、処理
ステップAにて読み出される変数値と処理ステップBに
て読み出される変数値が変わることがなくなる。
Therefore, it is indispensable to describe an interrupt prohibition / permission instruction in the program of the lower task as needed. The interrupt prohibition instruction prohibits the interrupt of the upper task, and the interrupt permission instruction enables the interrupt of the higher task. That is, the upper task cannot be interrupted in the middle of the processing step sandwiched by the interrupt prohibition instruction and the interrupt permission instruction. Therefore, in the case described above, the interrupt prohibition instruction is described before the processing step A in the program of the lower task, and the interrupt permission instruction is described after the processing step B. In this way, since the higher-level task does not interrupt during the processing from processing steps A to B sandwiched between the interrupt prohibition instruction and the interrupt permission instruction, the variable value read in processing step A The variable value read in processing step B does not change.

【0007】[0007]

【発明が解決しようとする課題】以上のように割込処理
は、リアルタイム処理の実行には不可欠の技術であり、
OSによるタスク管理といったコンピュータ技術の発達
によって容易に設計されるに至った。しかしながら一方
では、割込禁止/許可命令が適正に記述されないと折角
の技術もその効果を発揮しないことになる。
As described above, interrupt processing is an indispensable technique for executing real-time processing.
It was easily designed by the development of computer technology such as task management by OS. On the other hand, on the other hand, if the interrupt prohibition / permission command is not properly described, the technology of the dead end will not exert its effect.

【0008】例えば割込禁止命令が抜け落ちた場合に
は、上述したように不適切なタイミングで変数が書き換
えられてしまう事態が生じる。また、割込許可命令が抜
け落ちた場合には、上位タスクによる変数の書き換えが
なされない、又は、遅れてしまうことになって、リアル
タイム処理の実効が損なわれる。
For example, if the interrupt prohibition instruction is omitted, the variable may be rewritten at an inappropriate timing as described above. Further, when the interrupt permission instruction is omitted, the variable is not rewritten by the upper task, or it is delayed, so that the real-time processing is impaired.

【0009】従来、上述したようなグローバル変数1つ
1つについて、上位タスクの割り込みによって不具合の
生じる部分を特定し、割込禁止/許可命令がその部分の
前後に記述されているか否かを手作業によってチェック
している現状があった。このため、このチェック作業に
多大な工数を要していた。
Conventionally, with respect to each of the global variables as described above, a portion in which a failure is caused by an interrupt of a higher-level task is specified, and whether or not an interrupt prohibition / permission instruction is described before or after the portion is handled. There was a current situation in which it was checked by work. Therefore, this check work requires a great number of man-hours.

【0010】本発明は、上述した問題を解決するために
なされたものであり、共通のグローバル変数を扱う複数
の処理プログラムにおいて、割込処理によって不具合が
発生する可能性のあるグローバル変数の干渉部分を抽出
し、割込禁止/許可命令が適正位置に存在することを自
動的にチェックすることを目的とし、チェック作業の工
数削減に寄与する。
The present invention has been made in order to solve the above-mentioned problem, and in a plurality of processing programs that handle common global variables, an interference portion of global variables that may cause a failure due to interrupt processing. For the purpose of automatically checking that the interrupt prohibition / permission instruction exists at the proper position, and contributes to the reduction of the man-hours for the check work.

【0011】[0011]

【課題を解決するための手段及び発明の効果】上述した
目的を達成するためになされた請求項1に記載の割込命
令チェック装置は、実行単位となる複数の処理プログラ
ムからなるソースプログラムを対象としている。例えば
OS上でタスク管理されるプログラムであれば、この処
理プログラム毎にタスクが生成されることになる。
Means for Solving the Problems and Effects of the Invention An interrupt instruction check device according to claim 1 made to achieve the above-mentioned object is a source program composed of a plurality of processing programs as execution units. I am trying. For example, in the case of a program whose tasks are managed on the OS, a task is generated for each processing program.

【0012】このソースプログラムは、細分化されて記
述されている。処理プログラム単位で、あるいは、さら
にそれよりも細かな単位で細分化されている。例えば関
数型のプログラムを例に挙げれば、関数がその細分化の
単位であり、複数の関数にて1つの処理プログラムが構
成されるという具合である。
This source program is described in detail. It is subdivided in processing program units or in smaller units. For example, taking a function-type program as an example, a function is a unit of subdivision, and a plurality of functions constitute one processing program.

【0013】また、上述した処理プログラム毎に実行優
先順位が予め設定されており、ソースプログラムは、こ
の実行優先順位に基づき処理プログラム間で割込処理を
行って一連の機能を実現するためのものである。上述し
た例で言えば、タスク毎に設定されたタスクレベルがこ
こでいう「実行優先順位」に相当する。したがって、上
位タスクが下位タスクに割り込んでリアルタイム処理を
実現することによってエンジン等の制御を行う制御プロ
グラムが、ここでいうソースプログラムの一例となる。
Further, the execution priority is preset for each of the above-mentioned processing programs, and the source program realizes a series of functions by performing interrupt processing between the processing programs based on this execution priority. Is. In the example described above, the task level set for each task corresponds to the “execution priority order” here. Therefore, the control program that controls the engine and the like by realizing the real-time processing by the upper task interrupting the lower task is an example of the source program here.

【0014】本割込命令チェック装置は、このようなソ
ースプログラムを対象とし、上位処理プログラムに割り
込まれる可能性のある下位処理プログラム中の割込禁止
/許可命令をチェックする。上述した例で言えば、上位
タスクに割り込まれる下位タスクのプログラム中に記述
される割込命令をチェックすることになる。なお、上位
処理プログラムとは、上述した処理プログラム中で相対
的に実行優先順位が高いものをいい、逆に、下位処理プ
ログラムとは、上述した処理プログラム中で相対的に実
行優先順位が低いものをいう。「相対的に」であるか
ら、ある上位処理プログラムに対し、下位処理プログラ
ムが複数存在することがある。また逆に、ある下位処理
プログラムに対して上位処理プログラムが複数存在する
ことがある。さらに、ある処理プログラムに対しては上
位処理プログラムとなるプログラムが、別の処理プログ
ラムに対しては下位処理プログラムとなることがある。
The interrupt instruction checking device targets such a source program and checks an interrupt prohibition / permission instruction in a lower processing program which may be interrupted by a higher processing program. In the above example, the interrupt instruction written in the program of the lower task interrupted by the upper task is checked. It should be noted that the upper processing program means a program having a relatively high execution priority among the above processing programs, and conversely, the lower processing program has a relatively low execution priority among the above processing programs. Say. Since it is “relative”, a plurality of lower processing programs may exist for a certain upper processing program. Conversely, there may be a plurality of upper processing programs for a certain lower processing program. Further, a program that is an upper processing program for a certain processing program may be a lower processing program for another processing program.

【0015】具体的には、次に示す各手段によって割込
命令のチェックがなされる。プログラム読込手段は、ソ
ースプログラムを読み込む。このプログラム読込手段
は、本装置内部の記憶手段に記憶されたソースプログラ
ムを読み込むものとすることが考えられる。また、外部
に接続されたサーバに記憶されたソースプログラムを読
み込むものとしてもよい。
Specifically, each of the following means checks the interrupt instruction. The program reading means reads the source program. It is conceivable that the program reading means reads the source program stored in the storage means inside the apparatus. Further, the source program stored in the server connected to the outside may be read.

【0016】実行優先順位情報取得手段は、上述した処
理プログラム毎に予め設定された実行優先順位を示す情
報を取得する。OS上でタスク管理されるプログラムで
あれば、上述したタスクレベル情報を取得する。この実
行優先順位情報は、予め作成され、外部から提供される
ものとしてもよいが、装置内部で作成することも考えら
れる。例えばC言語では定義ファイルに実行優先順位が
記述されるのが一般的だからである。したがって、請求
項6に示すように、実行優先順位情報取得手段が、プロ
グラム読込手段にて読み込まれたソースプログラムの記
述に基づいて、実行優先順位情報を作成して取得するよ
うにしてもよい。このようにすれば、利用者が実行優先
順位情報を予め作成しておく必要がないという点で有利
である。
The execution priority order information acquisition means acquires information indicating the execution priority order set in advance for each processing program described above. If the program is a task managed on the OS, the above task level information is acquired. The execution priority information may be created in advance and provided from the outside, but may be created inside the device. This is because, for example, in C language, the execution priority is generally described in the definition file. Therefore, as described in claim 6, the execution priority order information acquiring means may create and acquire the execution priority order information based on the description of the source program read by the program reading means. This is advantageous in that the user does not need to create the execution priority information in advance.

【0017】このようにしてプログラム読込手段及び実
行優先順位情報取得手段にてソースプログラム及び実行
優先順位情報が得られると、これらの情報に基づき、割
込命令判断手段が、以下に示す判断を行う。つまり、上
位処理プログラムと下位処理プログラムとで共通に使用
されるグローバル変数に対する書込処理が上位処理プロ
グラム中にあれば、下位処理プログラム中のグローバル
変数に係る処理記述位置に応じた適正位置に割込禁止命
令及び割込許可命令が存在することを判断する。
When the source program and the execution priority information are obtained by the program reading means and the execution priority information acquisition means in this way, the interrupt instruction judging means makes the following judgment based on these information. . In other words, if the writing process for the global variable commonly used by the upper processing program and the lower processing program is in the upper processing program, it is assigned to an appropriate position according to the processing description position of the global variable in the lower processing program. Judge that there is an interrupt prohibition instruction and an interrupt permission instruction.

【0018】割込命令判断手段にてこのような判断がな
されると、その判断に基づく判断情報を出力手段が出力
する。判断に基づく判断情報とは、割込禁止/許可命令
が存在するか否かという情報であることが考えられる。
また、このような存在の有無を示す情報に加え又は代
え、その判断に際して取得可能な情報、例えばグローバ
ル変数に係る処理記述がプログラムの何行目にあるか、
割込禁止/許可命令が何行目に存在するか、あるいは、
割込禁止命令、割込許可命令のいずれが抜け落ちている
のかといった情報であることが考えられる。
When the interrupt command determining means makes such a determination, the output means outputs the determination information based on the determination. The judgment information based on the judgment can be information as to whether or not there is an interrupt prohibition / permission command.
Further, in addition to or instead of such information indicating the presence or absence, information that can be acquired at the time of the determination, for example, in what line of the program the process description related to the global variable is,
In what line the interrupt prohibition / permission command exists, or
It may be information such as which of the interrupt prohibition instruction and the interruption permission instruction is missing.

【0019】下位処理プログラム中に割込禁止/許可命
令が必要となるのは、例えば上位処理プログラム及び下
位処理プログラムの両方でグローバル変数に対する書込
処理を行う場合、上位処理プログラムでグローバル変数
に対する書込処理を行い下位処理プログラムでグローバ
ル変数に対する読込処理を行う場合等、上位処理プログ
ラム中にグローバル変数の書込処理がある場合に生じ
る。
An interrupt prohibition / permission command is required in the lower processing program because, for example, when writing processing to a global variable is performed in both the upper processing program and the lower processing program, the writing to the global variable is performed in the upper processing program. This occurs when there is a global variable write process in the higher-level processing program, such as when the lower-level processing program performs the read process for the global variable.

【0020】そのため、本発明では、実行優先順位情報
を用いることによって、グローバル変数の書込処理が上
位処理プログラム中にあれば、下位処理プログラム中の
グローバル変数に係る処理記述位置に応じた適正位置に
割込禁止/許可命令が存在することを判断し、その判断
に基づく判断情報を出力する。
Therefore, in the present invention, by using the execution priority information, if the writing process of the global variable is in the upper processing program, the proper position according to the processing description position related to the global variable in the lower processing program. It is judged that there is an interrupt prohibition / permission command in and the judgment information based on the judgment is output.

【0021】なお、割込命令判断手段は、下位処理プロ
グラム中のグローバル変数に係る処理記述の直前に割込
禁止命令が存在し、かつ、当該処理記述の直後に割込許
可命令が存在する場合に、割込禁止/許可命令が適正位
置に存在すると判断することが考えられる(請求項
2)。つまり、グローバル変数の読込処理及び書込処理
の途中で割り込みが発生しないようにすればよいため、
その読込処理又は書込処理の直前で割り込みを禁止し、
直後で割り込みを許可するのが、割り込み処理のリアル
タイム性という観点から適切となる。
It should be noted that the interrupt instruction judging means has an interrupt prohibition instruction immediately before the processing description relating to the global variable in the lower processing program and an interrupt permission instruction immediately after the processing description. In addition, it is conceivable to judge that the interrupt prohibition / permission command exists at the proper position (claim 2). In other words, it is sufficient to prevent an interrupt from occurring in the process of reading and writing global variables.
Disable interrupts immediately before the read or write process,
It is appropriate to permit interrupts immediately after that from the viewpoint of real-time interrupt processing.

【0022】特に下位処理プログラム中にグローバル変
数の読込処理が複数回あれば、当該複数回の読込処理の
うちの最初の読込処理記述の直前に割込禁止命令が存在
し、かつ、最後の読込処理記述の直後に割込許可命令が
存在する場合に、適正位置に割込禁止/許可命令が存在
すると判断することが考えられる(請求項3)。このよ
うに複数回の読込処理が割込禁止/許可命令で挟まれて
いれば、複数回読み出されるグローバル変数の値が割り
込みによって変わってくることがなくなるからである。
In particular, if the global variable read processing is performed a plurality of times in the lower processing program, an interrupt prohibition instruction exists immediately before the first read processing description of the plurality of read processing, and the last read processing is performed. When an interrupt permission command exists immediately after the process description, it is possible to determine that the interrupt prohibition / permission command exists at the proper position (claim 3). This is because if the read processing of a plurality of times is sandwiched between interrupt prohibition / permission instructions in this way, the value of the global variable read a plurality of times will not change due to an interrupt.

【0023】以上の構成を用いれば、共通のグローバル
変数を扱う複数の処理プログラムにおいて、割込処理に
よって不具合が発生する可能性のあるグローバル変数の
干渉部分を抽出することができ、割込禁止/許可命令が
適正位置に記述されているかことをチェックすることが
できる。したがって、利用者は、出力手段からの判断情
報に基づけば、ソースプログラムを速やかに修正するこ
とが可能となる。結果として、チェック作業に要する工
数を極端に削減することができる。
By using the above configuration, in a plurality of processing programs that handle common global variables, it is possible to extract the interfering portion of the global variables that may cause a failure due to the interrupt processing, and disable / interrupt. It is possible to check whether the permission command is written in the proper position. Therefore, the user can quickly modify the source program based on the judgment information from the output means. As a result, the man-hours required for the check work can be extremely reduced.

【0024】ところで、上述した割込命令判断手段を具
体化した構成が、請求項4に示すものである。この構成
において、割込命令判断手段は、変数検索手段、処理判
断手段、プログラム特定手段及び実行優先順位特定手段
の計4つの手段を備える。変数検索手段は、プログラム
読込手段にて読み込まれたソースプログラム中のグロー
バル変数を検索する。そして、処理判断手段は、プログ
ラム読込手段にて読み込まれたソースプログラム中の記
述を参照し、変数検索手段にて検索されたグローバル変
数に係る処理が読込処理であるかあるいは書込処理であ
るかを判断する。
By the way, a structure embodying the above-mentioned interrupt instruction judging means is shown in claim 4. In this configuration, the interrupt instruction judging means includes a total of four means, that is, a variable searching means, a processing judging means, a program specifying means, and an execution priority specifying means. The variable search means searches for a global variable in the source program read by the program reading means. Then, the processing judging means refers to the description in the source program read by the program reading means, and the processing relating to the global variable searched by the variable searching means is a reading processing or a writing processing. To judge.

【0025】また、プログラム特定手段は、検索された
グローバル変数が使用される処理プログラム又は当該処
理プログラムを構成する単位プログラムを特定する。単
位プログラムを特定するというのは、処理プログラムが
例えば複数の関数にて構成されていることがあるため、
その場合には単位プログラムとしてのその関数を特定す
ることをいう。
The program specifying means specifies the processing program in which the retrieved global variable is used or the unit program constituting the processing program. Specifying a unit program means that the processing program may consist of multiple functions, for example.
In that case, it means specifying the function as a unit program.

【0026】プログラム特定手段にて処理プログラム又
は単位プログラムが特定されると、実行優先順位特定手
段が、当該プログラムの実行優先順位を、実行優先順位
情報に基づいて特定する。これによって、検出されたグ
ローバル変数の使用されているプログラムが上位処理プ
ログラム(に属するもの)であるか下位処理プログラム
(に属するもの)であるかが特定されることになる。
When the processing program or the unit program is specified by the program specifying means, the execution priority specifying means specifies the execution priority of the program based on the execution priority information. As a result, it is specified whether the program in which the detected global variable is used is the upper processing program (belonging to) or the lower processing program (belonging to).

【0027】したがって、割込命令判断手段は、特定さ
れた処理プログラム(又は単位プログラム)の実行優先
順位と、上述した処理判断手段による判断結果、すなわ
ちグローバル変数に係る処理が読込処理であるか書込処
理であるかという判断結果とを用い、上述した適正位置
に割込禁止命令及び割込許可命令が存在することを判断
する。
Therefore, the interrupt instruction judging means writes the execution priority of the specified processing program (or unit program) and the judgment result by the processing judging means, that is, whether the processing related to the global variable is the reading processing. It is determined whether the interrupt prohibition instruction and the interrupt permission instruction are present at the above-mentioned proper positions by using the determination result of whether it is the interrupt processing.

【0028】この構成では、グローバル変数を検索し、
検索したグローバル変数を使用するプログラムを特定
し、さらに、それらプログラムの実行優先順位を特定す
る。つまり、各グローバル変数を基にして情報を整理す
るため、その処理内容が分かり易いものとなり、設計者
にとって処理設計が簡単になる。例えば上述した各手段
をコンピュータシステムの機能として実現する場合、そ
のプログラム設計が容易になる。
In this configuration, global variables are searched for,
The programs that use the retrieved global variables are specified, and the execution priority of those programs is specified. That is, since the information is organized based on each global variable, the processing content is easy to understand, and the designer can easily design the processing. For example, when each of the above-mentioned means is realized as a function of a computer system, its program design becomes easy.

【0029】なお、処理プログラムが複数の単位プログ
ラムで構成されている場合、上述した実行優先順位特定
手段は、それら単位プログラムの実行優先順位を特定す
る。したがって、このときは、処理プログラム毎に設定
された実行優先順位情報が、同時に単位プログラム毎に
設定されていることが前提となってくる。
When the processing program is composed of a plurality of unit programs, the above-mentioned execution priority specifying means specifies the execution priority of those unit programs. Therefore, at this time, it is premised that the execution priority information set for each processing program is also set for each unit program at the same time.

【0030】しかしながら、例えばソースプログラム中
の定義ファイルの情報に基づいて作成される実行優先順
位情報は、例えば処理プログラムが関数f1、関数f1
からコールされる関数f11、及び関数f11からコー
ルされる関数f12という3つの関数で構成されている
場合、最初に実行される関数f1のみに対応させて記述
されるのが一般的である。したがって、グローバル変数
が関数f11(単位プログラム)の中で使用される場
合、このような優先順位情報からは関数f11の実行優
先順位を特定することができない。
However, the execution priority information created based on the information of the definition file in the source program is, for example, the function f1 and the function f1 of the processing program.
When it is composed of three functions, that is, a function f11 called from the function f11 and a function f12 called from the function f11, it is general that only the function f1 executed first is described. Therefore, when the global variable is used in the function f11 (unit program), the execution priority order of the function f11 cannot be specified from such priority order information.

【0031】そこで、処理プログラムが複数の単位プロ
グラムで構成されていることを前提とすれば、請求項5
に示すように、さらに、処理プログラムを構成する単位
プログラム間のコール情報を探索するコール情報探索手
段を備え、実行優先順位特定手段が、実行優先順位情報
及びコール情報探索手段にて探索されたコール情報に基
づき、単位プログラムの実行優先順位を特定するように
するとよい。
Therefore, on the premise that the processing program is composed of a plurality of unit programs, the method according to claim 5
Further, as shown in FIG. 5, further provided is a call information searching means for searching call information between the unit programs constituting the processing program, and the execution priority specifying means is a call searched by the execution priority information and call information searching means. The execution priority of the unit program may be specified based on the information.

【0032】コール情報探索手段が単位プログラム間の
コール情報を探索するというのは、上述した例で言え
ば、関数f1から関数f11がコールされ、関数f11
から関数f12がコールされることを探索することをい
う。すなわち、ここでいう「コール情報」とは、「f1
→f11→f12」という情報であり、いわゆるコール
ツリーと呼ばれるものである。このようなコール情報を
用いれば、関数f1に対応させて実行優先順位情報が付
加されている場合であっても、関数f1と関数f11の
実行優先順位は同じであることが分かるため、単位プロ
グラムの実行優先順位を特定することができる。
In the above-mentioned example, the call information searching means searches for call information between unit programs. In the above example, the functions f1 to f11 are called and the function f11 is called.
To search for a call to the function f12. That is, the "call information" referred to here is "f1
The information is “→ f11 → f12”, which is a so-called call tree. If such call information is used, it can be seen that the execution priorities of the function f1 and the function f11 are the same, even if the execution priority information is added in association with the function f1. The execution priority of can be specified.

【0033】ところで、割込命令判断手段の判断に基づ
く判断情報を、出力手段が出力することは既に述べた。
具体的に、出力手段は、例えば結果ファイルとして記憶
手段へ出力することが考えられる(請求項7)。この記
憶手段は、本装置内部のものであっても外部のものであ
ってもよい。また、記憶手段への出力に加え又は代え、
表示手段へ出力するようにすることが考えられる(請求
項8)。
By the way, it has already been described that the output means outputs the determination information based on the determination by the interrupt instruction determination means.
Specifically, the output means may output the result file to the storage means, for example (claim 7). This storage means may be internal or external to the apparatus. Also, in addition to or instead of the output to the storage means,
It is conceivable to output to a display means (claim 8).

【0034】また、上述した構成では、出力手段から出
力された判断情報に基づき、利用者がソースプログラム
の記述を修正することを述べた。これに対して例えば請
求項9に示すように、プログラム修正手段を備え、この
プログラム修正手段が、出力手段から出力される判断情
報に基づき、適正位置に割込禁止命令又は割込許可命令
が存在しない場合には、割込禁止/許可命令が適正位置
にくるように、ソースプログラムを修正するようにして
もよい。この場合、割込禁止/許可命令のチェックだけ
でなくプログラム修正までが自動で行われるため、利用
者にとって便利である。
Further, in the above-mentioned configuration, it is described that the user corrects the description of the source program based on the judgment information output from the output means. On the other hand, for example, as described in claim 9, a program correcting means is provided, and the program correcting means has an interrupt prohibition instruction or an interrupt permission instruction at an appropriate position based on the judgment information output from the output means. If not, the source program may be modified so that the interrupt prohibition / permission instruction comes to the proper position. In this case, not only the checking of the interrupt prohibition / permission command but also the program correction is automatically performed, which is convenient for the user.

【0035】なお、このような割込命令チェック装置の
プログラム読込手段、実行優先順位情報取得手段、割込
命令判断手段及び出力手段をコンピュータシステムにて
実現する機能は、例えば、コンピュータシステム側で起
動するプログラムとして備えることができる。このよう
なプログラムの場合、例えば、フロッピーディスク、光
磁気ディスク、CD−ROM、ハードディスク等のコン
ピュータ読み取り可能な記録媒体に記録し、必要に応じ
てコンピュータシステムにロードして起動することによ
り用いることができる。この他、ROMやバックアップ
RAMをコンピュータ読み取り可能な記録媒体として前
記プログラムを記録しておき、このROMあるいはバッ
クアップRAMをコンピュータシステムに組み込んで用
いてもよい。
The function of realizing the program reading means, the execution priority information obtaining means, the interrupt instruction judging means and the output means of such an interrupt instruction checking device in a computer system is activated, for example, on the computer system side. It can be provided as a program. In the case of such a program, for example, it can be used by recording it on a computer-readable recording medium such as a floppy disk, a magneto-optical disk, a CD-ROM, a hard disk, and loading it into a computer system and activating it as necessary. it can. In addition, the program may be recorded in advance by using a ROM or backup RAM as a computer-readable recording medium, and the ROM or backup RAM may be incorporated into a computer system for use.

【0036】[0036]

【発明の実施の形態】以下、本発明を具体化した一実施
例を図面を参照して説明する。図1は、本発明を具体化
した割込命令チェック装置10を含むシステムの概要を
示す説明図である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is an explanatory diagram showing an outline of a system including an interrupt instruction check device 10 embodying the present invention.

【0037】本実施例の割込命令チェック装置10は、
外部の記憶装置20及び表示装置30に接続されてい
る。割込命令チェック装置10は、その内部にCPU、
ROM、RAM、I/Oなどを備え、いわゆるコンピュ
ータシステムとして構成されている。
The interrupt instruction check device 10 of this embodiment is
It is connected to an external storage device 20 and a display device 30. The interrupt instruction check device 10 includes a CPU,
It is provided with a ROM, a RAM, an I / O, etc., and is configured as a so-called computer system.

【0038】記憶装置20は、ハードディスク装置等の
大容量記憶装置である。この記憶装置20は、割込命令
チェック装置10にローカルに接続されるものであって
もよいが、例えばネットワークを介して接続されるもの
であってもよい。つまり、ネットワークを介して接続
し、割込命令チェック装置10とは別のコンピュータシ
ステムからもアクセス可能とすることが考えられる。こ
のようにすれば、記憶装置20内のデータを他のコンピ
ュータシステムから書き込んだり、他のコンピュータシ
ステムで読み出したりすることができる。
The storage device 20 is a mass storage device such as a hard disk device. The storage device 20 may be locally connected to the interrupt instruction check device 10, or may be connected via a network, for example. That is, it is conceivable that the computer is connected via a network and can be accessed from a computer system other than the interrupt instruction checking device 10. In this way, the data in the storage device 20 can be written to or read from another computer system.

【0039】表示装置30は、CRTや液晶などを用い
たディスプレイ装置である。本割込命令チェック装置1
0は、記憶装置20に記憶されたソースプログラム2
1、タスクレベル表22、及び環境ファイル23を読み
込み、ソースプログラム21中の適正位置に割込禁止命
令及び割込許可命令が記述されていることをチェック
し、そのチェック結果を結果ファイル24として記憶装
置20に記憶すると共に表示装置30へ出力する。した
がって、上述したように記憶装置20を他のコンピュー
タシステムからアクセスできるようにすれば、ソースプ
ログラム21、タスクレベル表22、及び環境ファイル
23を他のコンピュータシステムにて作成して記憶装置
20へ記憶しておくことができる。また、チェック結果
を他のコンピュータシステムにて参照することができ
る。
The display device 30 is a display device using a CRT or liquid crystal. This interrupt instruction check device 1
0 is the source program 2 stored in the storage device 20.
1, the task level table 22 and the environment file 23 are read, and it is checked that an interrupt prohibition instruction and an interruption permission instruction are described at appropriate positions in the source program 21, and the check result is stored as a result file 24. It is stored in the device 20 and is output to the display device 30. Therefore, if the storage device 20 is made accessible from another computer system as described above, the source program 21, the task level table 22, and the environment file 23 are created in another computer system and stored in the storage device 20. You can keep it. Further, the check result can be referred to by another computer system.

【0040】最初に、本割込命令チェック装置10が読
み込むソースプログラム21、タスクレベル表22、及
び環境ファイル23について説明する。ソースプログラ
ム21は、最終的には、ECUなどの有する所定のマイ
コンに搭載されるものであり、コンパイル/リンクされ
てOS上で実行される。このソースプログラム21は、
C言語で記述されており、複数の関数の集合体である。
そして、これらの関数はいくつかの関数グループに分け
られ、この関数グループの単位で実行される。この関数
グループ単位の処理実行状態がタスクとして上述したO
Sに管理される。したがって、この関数グループが「処
理プログラム」に相当し、各関数が処理プログラムを構
成する「単位プログラム」に相当する。
First, the source program 21, the task level table 22, and the environment file 23 read by the interrupt instruction checking device 10 will be described. The source program 21 is finally installed in a predetermined microcomputer such as an ECU, and is compiled / linked and executed on the OS. This source program 21
It is written in C language and is an aggregate of a plurality of functions.
Then, these functions are divided into several function groups and executed in units of this function group. The processing execution state of each function group is O described above as a task.
Managed by S. Therefore, this function group corresponds to a “processing program”, and each function corresponds to a “unit program” that constitutes the processing program.

【0041】タスクレベル表22は、上述した関数グル
ープの「実行優先順位」としてのタスクレベルを記述す
るものである。したがって、タスクレベル表22が「実
行優先順位情報」に相当する。具体的には、例えばある
関数グループが関数f1、関数f1からコールされる関
数f11、関数f11からコールされる関数f12及び
関数f13という4つの関数で構成されている場合、最
初に実行される関数f1に対してタスクレベルが記述さ
れる。なお、本明細書中では、関数グループの中で最初
に実行される関数を「メイン関数」と記述し、一方、メ
イン関数の配下に属する関数を「サブ関数」と記述する
ことにする。
The task level table 22 describes the task level as the "execution priority" of the above-mentioned function group. Therefore, the task level table 22 corresponds to “execution priority information”. Specifically, for example, when a certain function group is composed of four functions, function f1, function f11 called from function f1, function f12 and function f13 called from function f11, the function to be executed first The task level is described for f1. In this specification, the function to be executed first in the function group is described as a “main function”, and the function subordinate to the main function is described as a “sub function”.

【0042】タスクレベル表22を図2に例示した。各
関数グループのメイン関数f1,f2,f3,f4,・
・・にそれぞれ対応させてタスクレベルが記述されてい
る。図2に例示したものでは、タスクレベルの数値が小
さいほど実行優先順位が高くなっているものとして以下
の説明を続ける。図2では、メイン関数f1はタスクレ
ベル「1」となっており、メイン関数f2はタスクレベ
ル「2」となっている。同様に、メイン関数f3はタス
クレベル「6」、メイン関数f4はタスクレベル「3」
となっている。
The task level table 22 is illustrated in FIG. Main functions f1, f2, f3, f4, ...
-The task level is described in correspondence with each. In the example illustrated in FIG. 2, the following description will be continued on the assumption that the smaller the task level numerical value, the higher the execution priority. In FIG. 2, the main function f1 has a task level “1”, and the main function f2 has a task level “2”. Similarly, the main function f3 has a task level "6", and the main function f4 has a task level "3".
Has become.

【0043】したがって例えば、メイン関数f1の関数
グループ(以下「関数グループ1」という。)は、メイ
ン関数f2の関数グループ(以下「関数グループ2」と
いう。)よりも実行優先順位が高いことを示している。
つまり、実際にOS上で実行された場合、関数グループ
1に基づく処理は、関数グループ2に基づく処理に割り
込み可能である。割り込み可能とは、関数グループ2に
基づく処理実行中、関数グループ1に基づく処理の実行
指令があると、関数グループ2に基づく処理が一旦中断
されて関数グループ1に基づく処理が優先して実行さ
れ、関数グループ1に基づく処理終了後に、再び中断位
置から関数グループ2に基づく処理が実行されることを
いう。すなわち、関数グループ1は関数グループ2に対
し「上位処理プログラム」であり、関数グループ2は関
数グループ1に対し「下位処理プログラム」となってい
る。
Therefore, for example, the function group of the main function f1 (hereinafter referred to as "function group 1") has a higher execution priority than the function group of the main function f2 (hereinafter referred to as "function group 2"). ing.
That is, when actually executed on the OS, the process based on the function group 1 can interrupt the process based on the function group 2. Interruptible means that during execution of processing based on function group 2, if there is an execution command for processing based on function group 1, processing based on function group 2 is temporarily interrupted and processing based on function group 1 is executed with priority. It means that the processing based on the function group 2 is executed again from the interruption position after the processing based on the function group 1 is completed. That is, the function group 1 is a “upper processing program” for the function group 2, and the function group 2 is a “lower processing program” for the function group 1.

【0044】なお、図2では、タスクレベルの数値が小
さいほど実行優先順位が高いことを示しているが、その
逆の場合もあり、タスクレベルの数値が大きいほど実行
優先順位が高いことを示すタスクレベル表22が入力さ
れることがあり得る。このタスクレベル表22の記述形
式等を示す情報が記述されるのが、次に説明する環境フ
ァイル23である。
In FIG. 2, the smaller the task level numerical value is, the higher the execution priority is. However, in the opposite case, the larger the task level numerical value is, the higher the execution priority is. The task level table 22 may be entered. Information indicating the description format of the task level table 22 is described in the environment file 23 described below.

【0045】環境ファイル23は、本割込命令チェック
装置10の設定を行うためのファイルである。例えば上
述したタスクレベル表22のタスクレベルについて言え
ば、数値が小さいものほど実行優先順位が高いのか、逆
に数値が大きいものほど実行優先順位が高いのかを示す
情報が記述される。本割込命令チェック装置10は、こ
の環境ファイル23に基づいて、タスクレベル表22や
ソースファイル21の記述形式の違いを吸収する。その
結果、複数種類のソールファイル21やタスクレベル表
22に対して、本割込命令チェック装置10は動作す
る。例えば記憶装置20が異なるコンピュータシステム
に接続されている場合、それらコンピュータシステムか
らそれぞれ出力され記憶された、異なる記述形式のソー
スファイル21,タスクレベル表22に基づいて同様の
処理を行うことができる。
The environment file 23 is a file for setting the interrupt instruction check device 10. For example, regarding the task levels in the task level table 22 described above, information indicating that the smaller the numerical value is, the higher the execution priority is, or conversely, the larger the numerical value is, the higher the execution priority is described. The interrupt instruction check device 10 absorbs the difference in the description format of the task level table 22 and the source file 21 based on the environment file 23. As a result, the interrupt instruction check device 10 operates for a plurality of types of sole files 21 and task level tables 22. For example, when the storage device 20 is connected to different computer systems, the same processing can be performed based on the source files 21 and task level table 22 of different description formats that are respectively output and stored from those computer systems.

【0046】以上本実施例の割込命令チェック装置10
が読み込む情報について説明した。次に、本割込命令チ
ェック装置10の動作を説明する。ここでは最初に本割
込命令チェック装置10のチェックの目的を説明し、そ
の後、詳細な動作説明を行うことにする。
As described above, the interrupt instruction check device 10 of this embodiment
Explained the information read by. Next, the operation of the interrupt instruction check device 10 will be described. Here, the purpose of checking by the interrupt instruction checking apparatus 10 will be described first, and then the detailed operation will be described.

【0047】上述したようにソースプログラム21は、
関数グループ単位で実行され、関数グループ単位にタス
クレベルが設定されており、関数グループ間で割込処理
が実現される。このとき、タスクレベルが相対的に高い
上位の関数グループと、タスクレベルが相対的に低い下
位の関数グループとで、同一の変数を操作する可能性が
ある。この同一の変数は、グローバル変数として定義さ
れるものであり、関数グループ間で共通に使用可能なも
のである。このような同一のグローバル変数を上位の関
数グループと下位の関数グループとで操作すると、下位
の関数グループにおいて不具合を生じる可能性がある。
これは従来技術として述べたように、下位の関数グルー
プにてそのグローバル変数が操作されている際、上位の
関数グループの割り込みによって、同一のグローバル変
数が操作されてしまうからである。そのため、下位の関
数グループには、グローバル変数に係る処理記述の前後
に割込禁止/許可命令を記述し、上位の関数グループの
割り込みを一時的に禁止する。
As described above, the source program 21 is
It is executed in the function group unit, the task level is set in the function group unit, and the interrupt processing is realized between the function groups. At this time, there is a possibility that the same variable will be manipulated by the upper function group having a relatively high task level and the lower function group having a relatively low task level. This same variable is defined as a global variable and can be commonly used among the function groups. When such an identical global variable is manipulated by the upper function group and the lower function group, a malfunction may occur in the lower function group.
This is because, as described in the related art, when the global variable is operated in the lower function group, the same global variable is operated by the interrupt of the upper function group. Therefore, in the lower function group, interrupt prohibition / permission instructions are described before and after the processing description related to the global variable, and the interruption of the upper function group is temporarily prohibited.

【0048】本実施例の割込命令チェック装置は、この
割込禁止/許可命令が適正位置に記述されていることを
チェックすることを目的としている。図3は、本割込命
令チェック装置10の機能ブロック図である。図3に示
すように、本割込命令チェック装置10は、変数テーブ
ル作成ブロック11、コールツリー作成ブロック12、
変数属性テーブル作成ブロック13及び干渉検出/チェ
ックブロック14を備えている。以下、各ブロック11
〜14の動作を説明する。
The interrupt instruction checking device of this embodiment is intended to check that this interrupt prohibition / permission instruction is written in the proper position. FIG. 3 is a functional block diagram of the interrupt instruction checking device 10. As shown in FIG. 3, the interrupt instruction checking device 10 includes a variable table creating block 11, a call tree creating block 12,
A variable attribute table creation block 13 and an interference detection / check block 14 are provided. Below, each block 11
The operations of 14 to 14 will be described.

【0049】変数テーブル作成ブロック11は、ソース
プログラム21に基づき、変数テーブルを作成する。変
数テーブルは、図4に示すように、グローバル変数名、
関数名、行数、書き込み/読み込みの区別が記述された
ものである。なお、変数テーブルの左端の欄に示した
(1)〜(5)の数字は、この変数テーブル中の記述を
説明するために便宜上付したものである。
The variable table creation block 11 creates a variable table based on the source program 21. The variable table, as shown in FIG.
The function name, the number of lines, and the distinction between writing and reading are described. The numbers (1) to (5) shown in the leftmost column of the variable table are added for convenience of explanation of the description in the variable table.

【0050】変数テーブル作成ブロック11は次の〜
の手順で処理を実行する。 ソースプログラム21中のグローバル変数を検索す
る。検索されたグローバル変数は、変数テーブルの「グ
ローバル変数名」の欄に記される。 検索されたグローバル変数が使用されている関数を
取得する。取得された関数が、変数テーブルの「関数
名」の欄に記される。
The variable table creation block 11 is
Perform the process according to the procedure. A global variable in the source program 21 is searched. The retrieved global variable is written in the column of "global variable name" in the variable table. Get the function in which the retrieved global variable is used. The acquired function is written in the "function name" column of the variable table.

【0051】 グローバル変数に係る処理記述が上記
で取得された関数中(関数が記述されたファイル)の
何行目に当たるかを特定する。特定された行数が変数テ
ーブルの「行数」の欄に記される。 上記で特定された行数の処理記述がグローバル変
数の書込処理であるか読込処理であるかを判断する。書
込処理である場合には変数テーブルの「書き込み」の欄
に「○」が記され、一方、読込処理である場合には変数
テーブルの「読み込み」の欄に「○」が記される。
It is specified which line in the function (file in which the function is described) obtained above the processing description related to the global variable corresponds to. The specified number of lines is written in the "number of lines" column of the variable table. It is determined whether the process description of the number of lines specified above is a global variable write process or a global variable read process. In the case of the writing process, "○" is written in the "write" column of the variable table, while in the case of the reading process, "○" is written in the "read" column of the variable table.

【0052】例えば図4の変数テーブルに示す(3)の
場合について、実際のソースプログラム21から変数テ
ーブルを作成する過程を具体的に示す。例えばソースプ
ログラム21中に、図5に示す記述があったとして説明
を続ける。このとき、ソースプログラム21中でグロー
バル変数Val3を検索し(上記)、グローバル変数
Val3の使用される関数を取得する(上記)。図5
から分かるように、関数f2と関数f4が取得される。
したがって、図4に示すように、グローバル変数Val
3に対し関数名f2,f4が記される。
For example, in the case of (3) shown in the variable table of FIG. 4, the process of creating the variable table from the actual source program 21 will be concretely shown. For example, the description will be continued assuming that the description shown in FIG. 5 exists in the source program 21. At this time, the global variable Val3 is searched in the source program 21 (above), and the function used by the global variable Val3 is obtained (above). Figure 5
As can be seen from the above, the functions f2 and f4 are acquired.
Therefore, as shown in FIG.
For 3, the function names f2 and f4 are described.

【0053】続いて、グローバル変数に係る処理記述が
関数f2,f4の何行目に当たるかを特定する(上記
)。図5に示すように関数f2の15行目、関数f4
の7行目にその処理記述があれば、「15」,「7」が
行数として特定され、変数テーブルに記される。図4に
示す如くである。
Next, it is specified which line of the functions f2 and f4 the processing description relating to the global variable corresponds (above). As shown in FIG. 5, the fifteenth line of the function f2, the function f4
If there is the processing description in the 7th line of ",""15" and "7" are specified as the number of lines and written in the variable table. As shown in FIG.

【0054】そして次に、グローバル変数に係る処理記
述がグローバル変数の書込処理であるか読込処理である
かを判断する(上記)。書き込み処理(代入処理)で
ある場合は「=」の左側にグローバル変数が記述されて
いる。一方、読込処理である場合は「=」の右側にグロ
ーバル変数が記述されている。関数f2では「=」の左
側にグローバル変数Val3が記述されているため書込
処理と判断し、一方、関数f4では「=」の右側にグロ
ーバル変数Val3が記述されているため読込処理と判
断する。これによって、図4に示す変数テーブルには、
関数f2の15行目の処理記述に対応させ「書き込み」
の欄に「○」が記され、関数f4の7行目の処理記述に
対応させ「読み込み」の欄に「○」が記される。
Then, it is determined whether the process description related to the global variable is a global variable write process or a global variable read process (above). In the case of a writing process (substitution process), a global variable is described on the left side of "=". On the other hand, in the case of read processing, a global variable is described on the right side of "=". In the function f2, the global variable Val3 is described on the left side of "=", so it is determined to be the writing process. On the other hand, in the function f4, the global variable Val3 is described to the right side of the "=", and it is determined to be the reading process. . As a result, the variable table shown in FIG.
"Write" in correspondence with the processing description on the 15th line of the function f2
"○" is written in the column of "," and "○" is written in the column of "reading" corresponding to the processing description of the seventh line of the function f4.

【0055】コールツリー作成ブロック12は、ソース
プログラム21に基づき、「コール情報」としてのコー
ルツリーを作成する。具体的には、上述したメイン関数
内でサブ関数をコールする処理を検索し、サブ関数をコ
ールする処理があれば、そのサブ関数内でさらにサブ関
数をコールする処理を検索するという具合に、いわゆる
ネスト構造になっている関数グループ内の関係を特定す
る。このようにして、図6に示すようなコールツリーが
作成される。図6には、作成されるコールツリーの一部
を例示した。図6の上段に示すコールツリーは、関数f
1から関数f11がコールされ、さらに関数f11から
関数f12及び関数f13がコールされていることを示
している。他の関数f2,f3についても同様である。
つまり、図6中の実線で結ばれた複数の関数群が上述し
た関数グループを構成し、関数f1,f2,f3がメイ
ン関数、残りの関数f11,f12,f13,f21,
f22,f23,f31がサブ関数に相当する。
The call tree creation block 12 creates a call tree as "call information" based on the source program 21. Specifically, the process of calling a sub function in the above-mentioned main function is searched, and if there is the process of calling the sub function, the process of calling the sub function is further searched in the sub function. Identify the relationships within a so-called nested function group. In this way, the call tree as shown in FIG. 6 is created. FIG. 6 illustrates a part of the created call tree. The call tree shown in the upper part of FIG.
This indicates that the function f11 is called from 1 and the functions f12 and f13 are called from the function f11. The same applies to the other functions f2 and f3.
That is, a plurality of function groups connected by a solid line in FIG. 6 constitute the above-mentioned function group, the functions f1, f2, f3 are main functions, and the remaining functions f11, f12, f13, f21,
f22, f23, and f31 correspond to sub-functions.

【0056】変数属性テーブル作成ブロック13は、変
数テーブル作成ブロック11にて作成された変数テーブ
ル(図4参照)、コールツリー作成ブロック12にて作
成されたコールツリー(図6参照)、タスクレベル表2
2(図2参照)に基づき、変数属性テーブルを作成す
る。この変数属性テーブルは、図7に太枠にて示したよ
うに、変数テーブル(図4参照)に対し、関数名に対応
する「タスクレベル」が追加されたものである。なお、
変数属性テーブルの左端に示す(1)〜(5)の数字
は、変数テーブルと同様、説明のために便宜上付したも
のである。
The variable attribute table creation block 13 includes a variable table created by the variable table creation block 11 (see FIG. 4), a call tree created by the call tree creation block 12 (see FIG. 6), and a task level table. Two
2 (see FIG. 2), a variable attribute table is created. This variable attribute table is obtained by adding the "task level" corresponding to the function name to the variable table (see FIG. 4) as shown by the thick frame in FIG. In addition,
Like the variable table, the numbers (1) to (5) shown at the left end of the variable attribute table are added for convenience of description.

【0057】変数属性テーブルは、変数テーブルの「関
数名」の欄に記述された関数を1つずつ選択し、次の
及びの処理を実行する。 選択した関数がタスクレベル表22にあるか否かを
判断する。タスクレベル表22には、上述のように各関
数グループのメイン関数だけが記述されているため、変
数テーブルから選択した関数がメイン関数であればタス
クレベル表22に存在する。一方、変数テーブルから選
択した関数がサブ関数であればタスクレベル表22に存
在しない。
In the variable attribute table, the functions described in the "function name" column of the variable table are selected one by one, and the following processes (1) and (2) are executed. It is determined whether or not the selected function is in the task level table 22. Since only the main function of each function group is described in the task level table 22 as described above, if the function selected from the variable table is the main function, it exists in the task level table 22. On the other hand, if the function selected from the variable table is a sub-function, it does not exist in the task level table 22.

【0058】 上記で存在すると判断された場合、
タスクレベル表22に記述されているタスクレベルを変
数属性テーブルに記す。一方、上記で存在しないと判
断された場合、その関数はサブ関数であるため、コール
ツリー作成ブロック12にて作成されたコールツリーを
参照し、メイン関数を特定する。そして、タスクレベル
表22を参照して、そのメイン関数に対応するタスクレ
ベルを変数属性テーブルに記す。
If it is determined that the above exists,
The task level described in the task level table 22 is described in the variable attribute table. On the other hand, if it is determined that the function does not exist, the function is a sub-function, so the call tree created in the call tree creation block 12 is referenced to identify the main function. Then, with reference to the task level table 22, the task level corresponding to the main function is described in the variable attribute table.

【0059】この変数属性テーブルによれば、グローバ
ル変数を使用する関数が上位関数であるかあるいは下位
関数であるかが把握できる。つまり、割り込む側である
上位の関数グループに属する関数であるか、あるいは、
割り込まれる側である下位の関数グループに属する関数
であるかが把握できる。
According to this variable attribute table, it is possible to know whether the function that uses the global variable is a higher-level function or a lower-level function. In other words, it is a function that belongs to the higher-level function group that is the
It can be grasped whether the function belongs to the lower function group which is the interrupted side.

【0060】干渉検出/チェックブロック14は、上述
した変数属性テーブル作成ブロック13にて作成された
変数属性テーブル(図7参照)に基づき、割込禁止/許
可命令のチェック処理を実行し、結果ファイル24を記
憶装置20に出力すると共に表示用データ31を表示装
置30へ出力する。
The interference detection / check block 14 executes the check processing of the interrupt prohibition / permission command based on the variable attribute table (see FIG. 7) created in the variable attribute table creation block 13 described above, and the result file 24 is output to the storage device 20 and the display data 31 is output to the display device 30.

【0061】この干渉検出/チェックブロックにて実行
されるチェック処理を図8のフローチャートに基づいて
説明する。このチェック処理は、変数属性テーブルに記
載された各グローバル変数に対して実行されるものであ
る。図7に示した変数属性テーブルには計5つのグロー
バル変数があるため、このチェック処理は、繰り返し5
回実行されることになる。
The check processing executed by this interference detection / check block will be described with reference to the flowchart of FIG. This check processing is executed for each global variable described in the variable attribute table. Since there are a total of five global variables in the variable attribute table shown in FIG. 7, this check processing is repeated 5 times.
Will be executed once.

【0062】まず最初のステップS100において、変
数属性テーブルを読み込む。ここで読み込まれた変数属
性テーブルに基づき、以下の処理を実行する。続くS1
10では、関数毎に記述されたタスクレベルが異なるか
否かを判断する。図7の変数属性テーブルに示す(1)
〜(4)の場合は、関数間でタスクレベルが異なるた
め、肯定判断される。一方、(5)の場合は、タスクレ
ベルが共に「6」となっているため、否定判断される。
ここでタスクレベルが異なると判断された場合(S11
0:YES)、S120へ移行する。一方、タスクレベ
ルが同じであると判断された場合(S110:NO)、
S180へ移行する。
First, in step S100, the variable attribute table is read. The following processing is executed based on the variable attribute table read here. Continued S1
At 10, it is determined whether or not the task level described for each function is different. Shown in the variable attribute table of FIG. 7 (1)
In the case of (4) to (4), the task levels are different between the functions, and therefore a positive determination is made. On the other hand, in the case of (5), the task levels are both “6”, so a negative determination is made.
If it is determined here that the task levels are different (S11
0: YES), and the process proceeds to S120. On the other hand, when it is determined that the task levels are the same (S110: NO),
The process proceeds to S180.

【0063】S120では、上位関数で書き込みをする
か否かを判断する。上位関数でグローバル変数への書込
処理を行う場合にだけ、下位関数に割込禁止/許可命令
が必要となるためである。変数属性テーブルに示す
(1)〜(3)の場合は、タスクレベルの高い(数値の
小さい)関数である上位関数にて書込処理を行うため、
肯定判断される。一方、(4)の場合は、上位関数にて
書込処理を行わないため、否定判断される。ここで上位
関数で書き込みをすると判断された場合(S120:Y
ES)、S130へ移行する。一方、上位関数で書き込
みをしないと判断された場合(S120:NO)、S1
80へ移行する。
In S120, it is judged whether or not the upper function is used for writing. This is because the interrupt prohibition / permission instruction is required for the lower-level function only when the upper-level function writes the global variable. In the case of (1) to (3) shown in the variable attribute table, since the writing process is performed by the higher-level function which is a task level high (small numerical value),
Affirmative judgment is made. On the other hand, in the case of (4), since the writing process is not performed by the higher-level function, a negative determination is made. Here, when it is determined that writing is performed by the higher-level function (S120: Y
ES) and S130. On the other hand, when it is determined that the upper function does not write (S120: NO), S1
Move to 80.

【0064】S130では、下位関数における読み込み
が複数回か否かを判断する。この処理は、下位関数内の
グローバル変数の読込処理の記述が複数あるか否かを判
断するものである。変数属性テーブルに示す(1)の場
合は0回、(2)の場合は2回、(3)の場合は1回で
ある。したがって、(2)の場合だけ肯定判断される。
ここで読込処理が複数回でない、すなわち0回又は1回
であると判断された場合(S130:NO)、S140
へ移行する。一方、読込処理が複数回である、すなわち
2回以上であると判断された場合(S130:YE
S)、S150へ移行する。
In S130, it is determined whether or not the lower order function has been read a plurality of times. This processing is to determine whether or not there are a plurality of descriptions of the global variable read processing in the subordinate function. In the case of (1) shown in the variable attribute table, it is 0 times, in the case of (2), it is twice, and in the case of (3), it is once. Therefore, an affirmative judgment is made only in the case of (2).
If it is determined that the reading process is not performed multiple times, that is, 0 times or 1 time (S130: NO), S140.
Move to. On the other hand, when it is determined that the read processing is performed multiple times, that is, twice or more (S130: YE
S) and S150.

【0065】S140では、下位関数のグローバル変数
に係る処理記述の直前に割込禁止命令があり、かつ、処
理記述の直後に割込許可命令があることをチェックす
る。例えば変数属性テーブルの(3)の場合について具
体的に説明する。(3)の場合は、下位関数f4の7行
目のグローバル変数に係る処理記述の直前に割込禁止命
令が存在し、その処理記述の直後に割込許可命令が存在
することをチェックする。図5に割込禁止命令を「zd
i」として示し、割込許可命令を「zei」として示し
たが、この割込許可/禁止命令の存在をチェックするの
である。
In S140, it is checked that there is an interrupt prohibition instruction immediately before the processing description relating to the global variable of the lower-level function and that there is an interrupt permission instruction immediately after the processing description. For example, the case (3) of the variable attribute table will be specifically described. In the case of (3), it is checked that there is an interrupt prohibition instruction immediately before the processing description related to the global variable on the seventh line of the lower-level function f4, and that there is an interrupt permission instruction immediately after the processing description. The interrupt prohibition instruction is shown in FIG.
Although it is shown as "i" and the interrupt permission instruction is shown as "zei", the existence of this interrupt permission / prohibition instruction is checked.

【0066】S150では、複数の読込処理記述の内の
最初の読込処理記述の直前に割込禁止命令が存在し、か
つ、最後の読込処理記述の直後に割込許可命令が存在す
ることをチェックする。例えば変数属性テーブルの
(2)の場合について説明する。(2)の場合は、下位
関数f2の8行目と12行目に読込処理の記述が存在す
る。したがって、8行目の処理の直前に割込禁止命令が
存在し、かつ、12行目の処理の直後に割込許可命令が
存在することをチェックする。
In S150, it is checked that an interrupt prohibition command exists immediately before the first read process description among the plurality of read process descriptions, and that an interrupt enable command exists immediately after the last read process description. To do. For example, the case (2) of the variable attribute table will be described. In the case of (2), there is a description of the read process on the 8th and 12th lines of the lower-level function f2. Therefore, it is checked that there is an interrupt prohibition instruction immediately before the processing of the eighth line and that an interrupt permission instruction exists immediately after the processing of the twelfth row.

【0067】S160では、S140及びS150のチ
ェック結果に基づき、割込禁止/許可命令が存在するか
否かを判断する。ここで存在すると判断された場合(S
160:YES)、S170の処理を実行せず、S18
0へ移行する。一方、存在しないと判断された場合(S
160:NO)、S170にてNG判定をし、エラー情
報、エラーコードなどを作成して、その後、S180へ
移行する。
At S160, it is determined whether or not there is an interrupt prohibition / permission instruction based on the check results at S140 and S150. If it is determined that it exists here (S
160: YES), without executing the processing of S170, S18
Move to 0. On the other hand, when it is determined that the data does not exist (S
160: NO), an NG determination is made in S170, error information, an error code, etc. are created, and then the process proceeds to S180.

【0068】S180では、結果出力を行う。S11
0,S120,S160から、このS180へ移行した
場合には、そのグローバル変数の処理記述位置に応じた
適正位置に割込禁止/許可命令が存在する旨を、結果フ
ァイル24として記憶装置20に記憶すると共に表示デ
ータ34として表示装置30へ出力する。一方、S17
0からこのS180へ移行した場合には、適正位置に割
込禁止/許可命令が存在しない旨を示す詳細情報を含め
た結果ファイル24を記憶装置20へ記憶すると共に、
エラー情報及びエラーコードを表示データ34として表
示装置30へ出力する。
At S180, the result is output. S11
When the process proceeds from 0, S120, S160 to S180, the fact that the interrupt prohibition / permission command exists at the proper position according to the processing description position of the global variable is stored in the storage device 20 as the result file 24. At the same time, the display data 34 is output to the display device 30. On the other hand, S17
When the process proceeds from 0 to S180, the result file 24 including detailed information indicating that the interrupt prohibition / permission command does not exist at the proper position is stored in the storage device 20, and
The error information and the error code are output to the display device 30 as the display data 34.

【0069】次に、本割込命令チェック装置10の出力
情報について説明する。図8中のS180で説明したよ
うに表示用データ31及び結果ファイル24を出力する
(図3参照)。本実施例では、チェック結果に問題がな
い場合もその旨を表示するが、ここでは割込禁止/許可
命令が存在しない場合の出力情報について説明する。
Next, the output information of the interrupt instruction checking device 10 will be described. The display data 31 and the result file 24 are output as described in S180 in FIG. 8 (see FIG. 3). In the present embodiment, even if there is no problem in the check result, that fact is displayed, but here the output information when there is no interrupt prohibition / permission command will be described.

【0070】割込禁止/許可命令が適正位置に存在しな
い場合に出力される表示用データ31は、エラー情報、
エラーコードである。エラー情報は、そのグローバル変
数の処理記述位置に応じた適正位置に割込禁止/許可命
令が存在しない旨を示す情報であり、エラーコードは、
エラー情報をいくつかのケースに分類する情報である。
いくつかのケースとは、例えば割込禁止/許可命令の記
述が存在しないケースや、存在するが適正位置でないケ
ースなど種々考えられる。もちろんエラー情報のみを表
示するようにしてもよいが、エラーコードがあれば、ソ
ースプログラム21の修正が容易になり、ソースプログ
ラム21の修正工数の削減に寄与する。
The display data 31 output when the interrupt prohibition / permission command does not exist at the proper position is error information,
This is the error code. The error information is information indicating that the interrupt prohibition / permission instruction does not exist at the proper position according to the processing description position of the global variable, and the error code is
This is information that classifies error information into some cases.
Several cases are conceivable, for example, a case where an interrupt prohibition / permission command description does not exist, or a case where an interrupt prohibition / permission command exists but is not in an appropriate position. Of course, only the error information may be displayed, but if there is an error code, the source program 21 can be easily corrected, which contributes to the reduction of the correction man-hours of the source program 21.

【0071】一方、割込禁止/許可命令が適正位置に存
在しない場合に出力される結果ファイル24を図9に例
示した。この図9は、変数属性テーブルに示す(3)の
場合、すなわちグローバル変数Val3についてチェッ
クを行った結果、適正位置に存在しないと判断された際
の結果ファイル24を示すものである。
On the other hand, the result file 24 output when the interrupt prohibition / permission command does not exist at the proper position is shown in FIG. FIG. 9 shows the result file 24 in the case of (3) shown in the variable attribute table, that is, when it is determined that the global variable Val3 does not exist at the proper position as a result of checking.

【0072】まず、1行目の記述について説明する。
「0001」は、シリアルナンバーであり、上述したチ
ェック処理に対して連番で付加されるものである。「V
al3(int)」は、グローバル変数Val3につい
てのチェック結果であることを示し、「(int)」
は、このグローバル変数Val3が整数型であることを
示している。
First, the description of the first line will be described.
“0001” is a serial number, which is sequentially added to the above-described check processing. "V
"al3 (int)" indicates that the check result is for the global variable Val3, and "(int)"
Indicates that this global variable Val3 is of integer type.

【0073】「NG」は、グローバル変数Val3につ
いてのチェック結果に問題があることを示している。2
行目及び3行目は、グローバル変数に係る処理記述位置
毎のチェック結果を示している。2行目は関数f2内の
処理記述に対するチェック結果であり、3行目は関数f
4内の処理記述に対するチェック結果である。
"NG" indicates that there is a problem in the check result for the global variable Val3. Two
The third and third lines show the check result for each processing description position related to the global variable. The second line is the check result for the processing description in the function f2, and the third line is the function f.
It is a check result for the process description in 4.

【0074】2行目の「file3」は関数f2の記述
されたファイル名を示しており、3行目の「file
4」は関数f3の記述されたファイル名を示している。
「15」(2行目),「7」(3行目)は、ファイル内
(関数内)のグローバル変数の記述位置を示している。
The "file3" on the second line shows the file name in which the function f2 is described, and the "file3" on the third line.
4 ”indicates the file name in which the function f3 is described.
"15" (second line) and "7" (third line) indicate the description position of the global variable in the file (in the function).

【0075】「0001」は、上述したシリアルナンバ
ーであり、1行目に示したグローバル変数Val3の詳
細情報であることを示している。2行目の「OK」、3
行目の「NG」は、それぞれの関数内でのチェック結果
を示している。上位関数f2については、割込禁止/許
可命令のチェックを行わないため、常に「OK」が記さ
れる。
[0001] "0001" is the above-mentioned serial number and indicates that it is the detailed information of the global variable Val3 shown in the first line. 2nd line "OK", 3
“NG” on the line indicates the check result in each function. As for the higher-level function f2, "OK" is always written because the interrupt prohibition / permission instruction is not checked.

【0076】2行目の「#−f2_W」は関数f2内の
書込処理であることを示し、3行目の「#−f4_R」
は関数f4内の読込処理であることを示している。「V
al3=a;」及び「b=Val3;」は、それぞれ1
5行目及び7行目のグローバル変数に係る処理記述内容
を示している。
"# -F2_W" on the second line indicates that the writing process is within the function f2, and "# -f4_R" on the third line.
Indicates that it is a reading process in the function f4. "V
"al3 = a;" and "b = Val3;" are 1
The processing description contents related to the global variables on the fifth and seventh lines are shown.

【0077】なお、本実施例では、このような結果ファ
イル24を記憶する構成としたが、そのフォーマットは
特に限定されない。結果ファイル24からソースプログ
ラム21を修正することを考えれば処理記述位置を特定
できる情報が付加されることが望ましいが、少なくとも
グローバル変数に対してのチェック結果が得られればよ
い。
Although the result file 24 is stored in this embodiment, the format is not particularly limited. Considering that the source program 21 is modified from the result file 24, it is desirable to add information that can specify the processing description position, but at least a check result for the global variable can be obtained.

【0078】次に、本実施例の割込命令チェック装置1
0の発揮する効果を説明する。本実施例の割込命令チェ
ック装置10では、タスクレベル表22を用いて作成し
た変数属性テーブル(図7参照)を読み込み(図8中の
S100)、グローバル変数の書込処理が上位関数にあ
れば(S120)、下位関数中のグローバル変数に係る
処理記述位置に応じた適正位置に割込禁止/許可命令が
存在することを判断し(S140〜S170)、その判
断結果を出力する(S180)。これによって、グロー
バル変数を扱う関数グループにおいて不具合が発生する
可能性のあるグローバル変数の干渉部分を抽出すること
ができ、割込禁止/許可命令が適正な位置に記述されて
いるか否かをチェックすることができる。結果として、
割込禁止/許可命令のチェック工数の削減に寄与する。
Next, the interrupt instruction check device 1 of this embodiment
The effect of 0 will be described. In the interrupt instruction checking device 10 of the present embodiment, the variable attribute table (see FIG. 7) created by using the task level table 22 is read (S100 in FIG. 8), and the global variable writing process is executed by the higher-level function. If (S120), it is determined that an interrupt prohibition / permission instruction exists at an appropriate position corresponding to the processing description position related to the global variable in the lower-level function (S140 to S170), and the determination result is output (S180). . As a result, it is possible to extract the interference part of the global variable that may cause a malfunction in the function group that handles the global variable, and check whether the interrupt prohibition / permission command is written in the proper position. be able to. as a result,
Contributes to reduction of man-hours for checking interrupt prohibition / permission commands.

【0079】また、下位関数におけるグローバル変数に
係る処理記述の直前、直後に割込禁止/許可命令がある
ことをチェックする(図8中のS140)のはもちろん
であるが、下位関数中にグローバル変数の読出処理が複
数存在する場合には(S130:YES)、最初の読出
処理の直前に割込禁止命令が存在し、最後の読出処理の
直後に割込許可命令が存在することを判断する(S15
0)。このようなチェック結果に基づきソースプログラ
ム21を修正すれば、複数回の読出処理の途中で割り込
みが発生し、複数回の読出処理においてグローバル変数
の値が変わってくることがない。
It is needless to say that it is checked whether or not there is an interrupt prohibition / permission instruction immediately before or after the process description relating to the global variable in the subordinate function (S140 in FIG. 8). When there are a plurality of variable read processes (S130: YES), it is determined that the interrupt prohibition command exists immediately before the first read process and the interrupt enable command exists immediately after the last read process. (S15
0). If the source program 21 is modified on the basis of such a check result, an interrupt will not occur during the read processing of a plurality of times, and the value of the global variable will not change in the read processing of a plurality of times.

【0080】さらにまた、本実施例の割込命令チェック
装置10では、図3に示す変数テーブル作成ブロック1
1が、まず最初にグローバル変数を検索し(上記)、
そのグローバル変数に関する情報を記述した変数テーブ
ルを作成する(上記〜)。そしてさらに、変数属性
テーブル作成ブロック13が、その変数テーブルに関数
に対応するタスクレベルを追加した変数属性テーブルを
作成する(上記及び)。つまり、各グローバル変数
を基にして情報を整理するため、その処理内容が分かり
易いものとなり、設計者にとって各ブロック11〜14
の処理設計が容易になっている。
Furthermore, in the interrupt instruction check device 10 of this embodiment, the variable table creation block 1 shown in FIG.
1 first looks for a global variable (above),
Create a variable table that describes information about that global variable (above). Then, the variable attribute table creation block 13 creates a variable attribute table in which the task level corresponding to the function is added to the variable table (above and above). That is, since the information is organized based on each global variable, the contents of the processing are easy to understand, and the designer can use each of the blocks 11-14.
Process design has become easier.

【0081】また、本実施例では、図3に示すコールツ
リー作成ブロック12がソースプログラム21に基づ
き、コールツリー(図6参照)を作成する。したがっ
て、上述したように関数グループのメイン関数のみに対
応させてタスクレベルが記述されたタスクレベル表22
を用い、各関数グループの関数に対するタスクレベルを
特定することができる(上記及び)。つまり、タス
クレベル表22には、ソースプログラム21を構成する
関数の全てに対するタスクレベルを記述しておく必要が
ないのである。結果として、例えばソースプログラム2
1の定義ファイルに記述された情報のみを用いてタスク
レベル表22を作成すればよいという点で有利である。
In the present embodiment, the call tree creation block 12 shown in FIG. 3 creates a call tree (see FIG. 6) based on the source program 21. Therefore, as described above, the task level table 22 in which the task levels are described in correspondence with only the main functions of the function group
Can be used to specify the task level for the function in each function group (above and above). In other words, the task level table 22 does not need to describe the task levels for all the functions constituting the source program 21. As a result, for example, the source program 2
This is advantageous in that the task level table 22 may be created using only the information described in the definition file No. 1.

【0082】さらにまた、表示データ31として、チェ
ック結果に問題があったことを示すエラー情報と、その
エラーのケースを示すエラーコードを出力するようにし
た。これによって利用者は、チェック結果だけでなくそ
の内容を知ることができる。そしてまた、チェック結果
に問題があった場合、結果ファイル24には、図9に示
すような詳細情報を付加した形式の情報を記述する。し
たがって、利用者は、この結果ファイル24に基づき、
速やかにソースプログラム21を修正することができ
る。
Furthermore, as the display data 31, the error information indicating that there is a problem in the check result and the error code indicating the case of the error are output. This allows the user to know not only the check result but also its contents. If there is a problem with the check result, the result file 24 describes information in a format with detailed information as shown in FIG. Therefore, the user
The source program 21 can be promptly modified.

【0083】以上、本発明はこのような実施例に何等限
定されるものではなく、本発明の主旨を逸脱しない範囲
において種々なる形態で実施し得る。 (イ)上記実施例では、タスクレベル表22は、予め作
成されて記憶装置20に記憶されていた。これに対し
て、ソースプログラム21内にタスクレベルの定義ファ
イルがあれば、割込命令チェック装置10が読み込んだ
ソースプログラム21に基づき、タスクレベル表22を
作成して取得するようにしてもよい。このようにすれ
ば、タスクレベル表22を予め作成する必要がなくな
る。
As described above, the present invention is not limited to the embodiments as described above and can be implemented in various forms without departing from the gist of the present invention. (A) In the above embodiment, the task level table 22 was created in advance and stored in the storage device 20. On the other hand, if there is a task level definition file in the source program 21, the task level table 22 may be created and acquired based on the source program 21 read by the interrupt instruction checking device 10. This eliminates the need to create the task level table 22 in advance.

【0084】(ロ)また、上記実施例は結果ファイル2
4に基づき利用者がソースプログラム21を修正するも
のであったが、結果ファイル24の内容から割込命令チ
ェック装置10が自動的にソースプログラム21を修正
するように構成することも考えられる。
(B) In the above embodiment, the result file 2
Although the user has modified the source program 21 on the basis of No. 4, the interrupt instruction check device 10 may automatically modify the source program 21 based on the contents of the result file 24.

【0085】(ハ)さらにまた、上記実施例では、上位
関数中のグローバル変数に係る処理記述の前後の割込禁
止/許可命令のチェックは行っていない。これは上位関
数には割込禁止/許可命令があってもなくても実質的な
弊害がないからである。また、ある関数に対しての上位
関数が別の関数に対する下位関数となるからである。
(C) Furthermore, in the above embodiment, the interrupt prohibition / permission instructions before and after the processing description related to the global variable in the higher-level function are not checked. This is because there is substantially no harmful effect whether or not the upper-level function has an interrupt prohibition / permission command. In addition, a higher-level function for one function becomes a lower-level function for another function.

【0086】しかし、あるグローバル変数について見た
場合、どの関数よりも上位となる関数に割込禁止/許可
命令が存在している場合には、その割込禁止/許可命令
が不必要な割込禁止/許可命令であるとしてチェックす
るようにしてもよい。このチェック結果に基づけば不必
要な割込禁止/許可命令を取り除くことができ、上位関
数の処理実行に要する時間を短縮できることになる。
However, in the case of a certain global variable, if an interrupt prohibition / permission instruction exists in a function higher than any function, the interruption prohibition / permission instruction is unnecessary. You may make it check that it is a prohibition / permission command. On the basis of this check result, unnecessary interrupt prohibition / permission instructions can be removed, and the time required to execute the processing of the higher-level function can be shortened.

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

【図1】実施例の割込命令チェック装置を含むシステム
の説明図である。
FIG. 1 is an explanatory diagram of a system including an interrupt instruction check device according to an embodiment.

【図2】タスクレベル表を例示する説明図である。FIG. 2 is an explanatory diagram illustrating a task level table.

【図3】実施例の割込命令チェック装置の機能ブロック
図である。
FIG. 3 is a functional block diagram of an interrupt instruction check device according to an embodiment.

【図4】変数テーブルを例示する説明図である。FIG. 4 is an explanatory diagram illustrating a variable table.

【図5】ソースプログラム中の記述例を示す説明図であ
る。
FIG. 5 is an explanatory diagram showing a description example in a source program.

【図6】コールツリーを例示する説明図である。FIG. 6 is an explanatory diagram illustrating a call tree.

【図7】変数属性テーブルを例示する説明図である。FIG. 7 is an explanatory diagram illustrating a variable attribute table.

【図8】チェック処理を示すフローチャートである。FIG. 8 is a flowchart showing a check process.

【図9】結果ファイルの記述例を示す説明図である。FIG. 9 is an explanatory diagram showing a description example of a result file.

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

10…割込命令チェック装置 11…変数テーブル作成ブロック 12…コールツリー作成ブロック 13…変数属性テーブル作成ブロック 14…干渉検出/チェックブロック 20…記憶装置 21…ソースプログラム 22…タスクレベル表 23…環境ファイル 24…結果ファイル 30…表示装置 31…表示用データ 10 ... Interrupt instruction check device 11 ... Variable table creation block 12 ... Call tree creation block 13 ... Variable attribute table creation block 14 ... Interference detection / check block 20 ... Storage device 21 ... Source program 22 ... Task level table 23 ... Environment file 24 ... Result file 30 ... Display device 31 ... Display data

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 11/28 G06F 9/44 G06F 9/46 ─────────────────────────────────────────────────── ─── Continued Front Page (58) Fields surveyed (Int.Cl. 7 , DB name) G06F 11/28 G06F 9/44 G06F 9/46

Claims (10)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】実行単位となる複数の処理プログラムから
なる、細分化されて記述されたソースプログラムであっ
て、前記処理プログラム毎に予め設定された実行優先順
位に基づき、当該処理プログラム間で割込処理を行い一
連の機能を実現するためのソースプログラムを対象と
し、前記実行優先順位が相対的に高い上位処理プログラ
ムに割り込まれる可能性のある前記実行優先順位が相対
的に低い下位処理プログラム中の割込禁止/許可命令を
チェックする割込命令チェック装置であって、 前記ソースプログラムを読み込むプログラム読込手段
と、 前記実行優先順位を示す実行優先順位情報を取得する実
行優先順位情報取得手段と、 前記プログラム読込手段にて読み込まれたソースプログ
ラム及び前記実行順位情報取得手段にて取得された前記
実行優先順位情報に基づき、前記上位処理プログラムと
前記下位処理プログラムとで共通に使用されるグローバ
ル変数の書込処理が前記上位処理プログラム中にあれ
ば、前記下位処理プログラム中の当該グローバル変数に
係る処理記述位置に応じた適正位置に割込禁止命令及び
割込許可命令が存在することを判断する割込命令判断手
段と、 該割込命令判断手段による判断に基づく判断情報を出力
する出力手段とを備えていることを特徴とする割込命令
チェック装置。
1. A source program, which is composed of a plurality of processing programs as execution units and is described in detail, and which is divided among the processing programs based on an execution priority set in advance for each of the processing programs. Targeting a source program for executing a series of functions by executing an embedded process, and a lower processing program having a relatively lower execution priority that may be interrupted by a higher processing program having a relatively higher execution priority An interrupt instruction checking device for checking the interrupt prohibition / permission instruction of, a program reading means for reading the source program, an execution priority information acquiring means for acquiring execution priority information indicating the execution priority, The source program read by the program reading means and acquired by the execution order information acquisition means If there is a global variable writing process commonly used by the upper processing program and the lower processing program in the upper processing program based on the execution priority information, the global variable in the lower processing program is written to the global variable. An interrupt command determination means for determining whether an interrupt prohibition command and an interrupt permission command are present at appropriate positions according to the processing description position, and output means for outputting determination information based on the determination by the interrupt command determination means. An interrupt instruction check device comprising:
【請求項2】請求項1に記載の割込命令チェック装置に
おいて、 前記割込命令判断手段は、前記下位処理プログラム中の
前記グローバル変数に係る処理記述の直前に前記割込禁
止命令が存在し、かつ、当該処理記述の直後に前記割込
許可命令が存在する場合に、前記適正位置に前記割込禁
止命令及び前記割込許可命令が存在すると判断すること
を特徴とする割込命令チェック装置。
2. The interrupt instruction check device according to claim 1, wherein the interrupt instruction determination means has the interrupt disable instruction immediately before a processing description related to the global variable in the lower processing program. And, when the interrupt permission command exists immediately after the process description, it is determined that the interrupt prohibition command and the interrupt permission command exist at the proper position. .
【請求項3】請求項2に記載の割込命令チェック装置に
おいて、 前記割込命令判断手段は、前記下位処理プログラム中に
前記グローバル変数の読込処理が複数回あれば、当該複
数回の読込処理記述のうちの最初の読込処理記述の直前
に前記割込禁止命令が存在し、かつ、最後の読込処理記
述の直後に前記割込許可命令が存在する場合に、前記適
正位置に前記割込禁止命令及び前記割込許可命令が存在
すると判断することを特徴とする割込命令チェック装
置。
3. The interrupt instruction check device according to claim 2, wherein the interrupt instruction determination means, if the global variable read processing is performed a plurality of times in the lower processing program, the read processing is performed a plurality of times. If the interrupt prohibition command exists immediately before the first read process description and the interrupt enable command exists immediately after the last read process description, the interrupt prohibition is performed at the proper position. An interrupt instruction check device, which determines that an instruction and the interrupt permission instruction are present.
【請求項4】請求項1〜3のいずれかに記載の割込命令
チェック装置において、 前記割込命令判断手段は、 前記プログラム読込手段にて読み込まれたソースプログ
ラム中の前記グローバル変数を検索する変数検索手段
と、 前記プログラム読込手段にて読み込まれたソースプログ
ラム中の記述を参照し、前記変数検索手段にて検索され
たグローバル変数に対する処理が読込処理であるか又は
書込処理であるかを判断する処理判断手段と、 前記変数検索手段にて検索された前記グローバル変数が
使用される前記処理プログラム又は当該処理プログラム
を構成する単位プログラムを特定するプログラム特定手
段と、 該プログラム特定手段にて特定された前記処理プログラ
ム又は前記単位プログラムの実行優先順位を、前記実行
優先順位情報取得手段にて取得された前記実行優先順位
情報に基づいて特定する実行優先順位特定手段とを備
え、 該実行優先順位特定手段にて特定された前記実行優先順
位及び前記処理判断手段による判断結果に基づき、前記
適正位置に前記割込禁止命令及び前記割込許可命令が存
在することを判断することを特徴とする割込命令チェッ
ク装置。
4. The interrupt instruction check device according to claim 1, wherein the interrupt instruction determination means searches for the global variable in the source program read by the program reading means. By referring to the description in the source program read by the variable searching means and the program reading means, it is determined whether the process for the global variable searched by the variable searching means is a reading process or a writing process. Processing determining means for determining, program specifying means for specifying the processing program in which the global variable searched by the variable searching means is used, or a unit program constituting the processing program, and specified by the program specifying means The execution priority information of the executed execution priority of the processing program or the unit program An execution priority specifying unit that specifies the execution priority information obtained by a step, and based on the execution priority specified by the execution priority specifying unit and the determination result by the process determining unit. An interrupt instruction check device, characterized in that it is determined that the interrupt prohibition instruction and the interrupt permission instruction exist at the proper position.
【請求項5】請求項4に記載の割込命令チェック装置に
おいて、 前記処理プログラムは、複数の単位プログラムで構成さ
れており、 さらに、前記処理プログラムを構成する前記単位プログ
ラム間のコール情報を探索するコール情報探索手段を備
え、 前記実行優先順位特定手段は、前記実行優先順位情報及
び前記コール情報探索手段にて探索された前記コール情
報に基づき、前記単位プログラムの実行優先順位を特定
することを特徴とする割込命令チェック装置。
5. The interrupt instruction check device according to claim 4, wherein the processing program is composed of a plurality of unit programs, and further search call information between the unit programs forming the processing program. The execution priority specifying means specifies the execution priority of the unit program based on the execution priority information and the call information searched by the call information searching means. Characteristic interrupt instruction check device.
【請求項6】請求項1〜5のいずれかに記載の割込命令
チェック装置において、 前記実行優先順位情報取得手段は、前記プログラム読込
手段にて読み込まれたソースプログラムの記述に基づい
て、前記実行優先順位情報を作成して取得することを特
徴とする割込命令チェック装置。
6. The interrupt instruction check device according to any one of claims 1 to 5, wherein the execution priority information acquisition means is based on a description of a source program read by the program reading means. An interrupt instruction check device characterized by creating and acquiring execution priority information.
【請求項7】請求項1〜6のいずれかに記載の割込命令
チェック装置において、 前記出力手段は、前記判断情報を結果ファイルとして記
憶手段へ出力することを特徴とする割込命令チェック装
置。
7. The interrupt instruction check device according to claim 1, wherein the output unit outputs the determination information as a result file to a storage unit. .
【請求項8】請求項1〜7のいずれかに記載の割込命令
チェック装置において、 前記出力手段は、前記判断情報を表示手段へ出力するこ
とを特徴とする割込命令チェック装置。
8. The interrupt instruction check device according to claim 1, wherein the output means outputs the judgment information to a display means.
【請求項9】請求項1〜8のいずれかに記載の割込命令
チェック装置において、 さらに、前記出力手段から出力される前記判断情報に基
づき、前記適正位置に前記割込禁止命令又は割込許可命
令の少なくともいずれか一方が存在しない場合には、前
記適正位置に記述して前記ソースプログラムを修正する
プログラム修正手段を備えることを特徴とする割込命令
チェック装置。
9. The interrupt instruction check device according to claim 1, further comprising the interrupt prohibition instruction or interrupt at the proper position based on the determination information output from the output means. An interrupt instruction check device comprising a program modifying means for modifying the source program by describing the source program when at least one of the permitting commands does not exist.
【請求項10】請求項1〜9のいずれかに記載の割込命
令チェック装置の前記プログラム読込手段、前記実行優
先順位情報取得手段、前記割込命令判断手段及び前記出
力手段としてコンピュータシステムを機能させるための
プログラムを記録したコンピュータ読み取り可能な記録
媒体。
10. A computer system functions as the program reading means, the execution priority information obtaining means, the interrupt instruction determining means, and the output means of the interrupt instruction checking device according to claim 1. A computer-readable recording medium in which a program for causing the program is recorded.
JP29558799A 1999-10-18 1999-10-18 Interruption instruction check device and recording medium Expired - Fee Related JP3458796B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29558799A JP3458796B2 (en) 1999-10-18 1999-10-18 Interruption instruction check device and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29558799A JP3458796B2 (en) 1999-10-18 1999-10-18 Interruption instruction check device and recording medium

Publications (2)

Publication Number Publication Date
JP2001117791A JP2001117791A (en) 2001-04-27
JP3458796B2 true JP3458796B2 (en) 2003-10-20

Family

ID=17822568

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29558799A Expired - Fee Related JP3458796B2 (en) 1999-10-18 1999-10-18 Interruption instruction check device and recording medium

Country Status (1)

Country Link
JP (1) JP3458796B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4611659B2 (en) * 2004-04-19 2011-01-12 上田日本無線株式会社 Unauthorized access detection device, unauthorized access detection method, program
KR100843134B1 (en) 2006-09-15 2008-07-02 삼성전자주식회사 Apparatus and Method of handling interrupt disabled section and Apparatus and Method of pinning page
JP5409039B2 (en) * 2009-02-17 2014-02-05 三菱電機株式会社 Information processing apparatus, information processing method, and program
JP5848553B2 (en) * 2011-08-31 2016-01-27 キヤノン株式会社 Software analysis apparatus and program
JP2015022484A (en) * 2013-07-18 2015-02-02 スパンション エルエルシー Program inspection program, inspection apparatus, and inspection method
IN2013MU02701A (en) * 2013-08-19 2015-06-26 Tata Consultancy Services Ltd

Also Published As

Publication number Publication date
JP2001117791A (en) 2001-04-27

Similar Documents

Publication Publication Date Title
JP3458796B2 (en) Interruption instruction check device and recording medium
US20070226172A1 (en) File-management apparatus, file-management method, and computer product
JPH02148168A (en) Editing supporting method
JPH08147278A (en) Program registering device for external editing
US20030225929A1 (en) Computer-hardware, life-extension apparatus and method
JP2002312196A (en) Interrupt instruction check device and program
JP2003241997A (en) Interruption command check device and interruption command check program
JP2002312194A (en) Interrupt instruction check device and program
JP2001117793A (en) Interrupting instruction checker and recording medium
JP2002312195A (en) Interrupt instruction check device and program
JP3130798B2 (en) Bus transfer device
JP2003303116A (en) Interruption command checking device and program
JPS62168229A (en) Automatic recognizing system for system constitution
JPS61141047A (en) Saving system of trouble information
JP2001117792A (en) Interrupting instruction checker and recording medium
JP3102568B2 (en) Software development equipment
JP2005149361A (en) Virtual machine system and program of controlling virtual machine system
JPH1145103A (en) Programming device, interruption processing describing method, programmable controller and recording medium
JPH09160611A (en) Programmable controller
JP3263987B2 (en) Automatic IPL initial setting processing method
JPH08179991A (en) Programmable controller
JPH02231634A (en) Method for maintaining interchangeability of software
JPH03246643A (en) Processing for editing dump summary
JPH0338610B2 (en)
JPH07152622A (en) Method and device for information processing

Legal Events

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

Free format text: PAYMENT UNTIL: 20090808

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100808

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100808

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110808

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120808

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20130808

Year of fee payment: 10

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees