Nothing Special   »   [go: up one dir, main page]

JP2005149179A - Object number adjusting device - Google Patents

Object number adjusting device Download PDF

Info

Publication number
JP2005149179A
JP2005149179A JP2003386382A JP2003386382A JP2005149179A JP 2005149179 A JP2005149179 A JP 2005149179A JP 2003386382 A JP2003386382 A JP 2003386382A JP 2003386382 A JP2003386382 A JP 2003386382A JP 2005149179 A JP2005149179 A JP 2005149179A
Authority
JP
Japan
Prior art keywords
maximum value
definition file
database
processing unit
service call
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003386382A
Other languages
Japanese (ja)
Inventor
Hiroshi Mitsuyama
弘 光山
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.)
Toshiba Corp
Kioxia Systems Co Ltd
Original Assignee
Toshiba Corp
Toshiba Memory Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp, Toshiba Memory Systems Co Ltd filed Critical Toshiba Corp
Priority to JP2003386382A priority Critical patent/JP2005149179A/en
Publication of JP2005149179A publication Critical patent/JP2005149179A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an object number adjusting device capable of adjusting the number of objects within an object definition file to match the number of objects being used in an application program. <P>SOLUTION: In the object number adjusting device 1, a parameter detection process part 11 reads an application source program 21 and a service call database 22 to extract the parameter of a service call in use and write it into a parameter database 23. An object ID maximum value extracting process part 12 extracts an object ID portion of the parameter and writes its maximum value into an object ID maximum value database 24. An object number adjusting process part 13 outputs a rewritten and adjusted object definition file 26 so that the number of objects defined in the object definition file 34 matches the maximum value of an object ID. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、リアルタイムOSに関し、特に、システムのコンフィギュレーションにおけるオブジェクト数の調整を行うオブジェクト数調整装置に関する。   The present invention relates to a real-time OS, and more particularly, to an object number adjustment device that adjusts the number of objects in a system configuration.

大規模な組み込みシステムを開発する場合、アプリケーション・ソフトウェアを効率的に開発するためにリアルタイムOS(RTOS)を用いることが一般的に行われている。このRTOSの代表的なものにTRONがある。このうち、8ビットマイクロプロセッサやシングルチップマイクロプロセッサへの搭載を可能としたものがμITRONと呼ばれ、現在、その4.0版(μITRON4.0)の仕様が公開されている。   When developing a large-scale embedded system, a real-time OS (RTOS) is generally used to efficiently develop application software. TRON is a representative RTOS. Among them, the one that can be mounted on an 8-bit microprocessor or a single chip microprocessor is called μITRON, and the specification of the 4.0 version (μITRON 4.0) is currently available.

このμITRON4.0では、アプリケーションプログラムからカーネルまたはソフトウェア部品を呼び出すインターフェイスをサービスコールと呼び、サービスコールの対象となるものを総称してオブジェクトと呼んでいる。オブジェクトはその種類ごとに番号を付けて識別される。その内、タスク、セマフォ、メールボックスなどのオブジェクトはユーザが識別番号を指定でき、これをID番号と呼ぶ。ID番号として、ユーザは1から順次正の整数を付与する。   In μITRON 4.0, an interface for calling a kernel or a software component from an application program is called a service call, and a target of the service call is generically called an object. Objects are identified by a number for each type. Among them, objects such as tasks, semaphores, and mailboxes can be assigned identification numbers by the user, and these are called ID numbers. As the ID number, the user sequentially assigns positive integers starting from 1.

アプリケーションプログラムの作成においては、ID番号を持つオブジェクトのサービスコールを使用する際に、そのサービスコールに対して、オブジェクトのID番号を渡す必要がある。μITRON4.0では、このようなサービスコールに渡すデータをパラメータと呼んでいる。   In creating an application program, when using a service call of an object having an ID number, it is necessary to pass the object ID number to the service call. In μITRON 4.0, data passed to such a service call is called a parameter.

また、μITRON4.0では、アプリケーションプログラムの作成に先立って、アプリケーションプログラムで使用するオブジェクトの種類や数量を記述したコンフィギュレーションファイルを作成し、このファイルをC言語のプリプロセッサに通した後にコンフィギュレータで処理するように規定されている(例えば、非特許文献1参照。)。   In μITRON 4.0, prior to creating an application program, a configuration file describing the type and quantity of objects used in the application program is created, and this file is passed through a C language preprocessor and processed by the configurator. (For example, refer nonpatent literature 1).

このコンフィギュレータによる処理を行うと、オブジェクトの使用数量を記載したオブジェクト定義ファイルが生成される。
坂村健監修、高田広章編、“μITRON4.0仕様(Ver.4.01.00)”、[online]、2001年5月1日、トロン協会、p.32−p.36、図2−1、[平成15年8月26日検索]、インターネット<URL :http://www.ertl.jp/ITRON/SPEC/FILE/mitron-401j.pdf>
When processing by this configurator is performed, an object definition file describing the amount of objects used is generated.
Supervised by Ken Sakamura, edited by Hiroaki Takada, “μITRON 4.0 Specification (Ver. 4.01.00)”, [online], May 1, 2001, TRON Association, p. 32-p. 36, Fig. 2-1, [August 26, 2003 search], Internet <URL: http://www.ertl.jp/ITRON/SPEC/FILE/mitron-401j.pdf>

しかしながら、上述のオブジェクト定義ファイルに記載されたオブジェクト数は、アプリケーションプログラム作成前に想定した値であり、アプリケーションプログラムの作成時に実際に使用されるオブジェクト数との間で不整合を生じることがある。   However, the number of objects described in the above-described object definition file is a value assumed before creating the application program, and there may be a mismatch with the number of objects actually used when creating the application program.

このような不整合が、オブジェクト定義ファイルに記載されている値が実際に使用するオブジェクトの数より少ない場合であるときは、プログラムの実行ができなくなるなどのエラーが生じる。   When such an inconsistency is a case where the value described in the object definition file is smaller than the number of objects actually used, an error such as the inability to execute the program occurs.

一方、オブジェクト定義ファイルに記載されている値が実際に使用するオブジェクトの数より多い場合、組み込みシステムの資源を無駄に使用することがある。例えば、セマフォやメールボックスなどのオブジェクトの使用を定義すると、システム制御用のコントロールブロックがその定義した数量分生成され、その分のROM/RAM領域が確保される。しかし、実際に使用するオブジェクトの数が予め定義した数量より少ないと、確保したROM/RAM領域の中に使用されない領域が生じる。このような使用されないROM/RAM領域が生じることは、限られた容量のROM/RAMしか搭載されない組み込みシステムにおいては大きな問題となる。   On the other hand, when the value described in the object definition file is larger than the number of objects actually used, the resources of the embedded system may be wasted. For example, when the use of an object such as a semaphore or a mailbox is defined, a control block for system control is generated for the defined quantity, and a corresponding ROM / RAM area is secured. However, if the number of objects actually used is less than a predefined number, an unused area is generated in the reserved ROM / RAM area. The generation of such an unused ROM / RAM area is a serious problem in an embedded system in which only a limited capacity ROM / RAM is mounted.

そこで、本発明の目的は、オブジェクト定義ファイルに記載されたオブジェクト数をアプリケーションプログラムで使用するオブジェクト数に整合するように調整するオブジェクト数調整装置を提供することにある。   Therefore, an object of the present invention is to provide an object number adjusting device that adjusts the number of objects described in an object definition file so as to match the number of objects used in an application program.

本発明の一態様によれば、コンフィギュレーション情報ファイルに基づいてコンフィギュレータにより生成されるオブジェクト定義ファイルに記載されるオブジェクト数を調整する装置であって、アプリケーションソースプログラムを読み込んで前記アプリケーションソースプログラムに記述されたサービスコールのパラメータを抽出してサービスコールごとのパラメータデータベースを生成するパラメータ抽出処理部と、前記パラメータデータベースを検索して前記サービスコールが呼び出すオブジェクトのオブジェクトIDの最大値を抽出してオブジェクトごとのオブジェクトID最大値データベースを生成するオブジェクトID最大値抽出処理部と、前記オブジェクトID最大値データベースに記載された前記オブジェクトID最大値と前記オブジェクト定義ファイルに記載された前記オブジェクト数を前記オブジェクトごとに比較してその値が不一致のときはオブジェクト数不一致警告情報を生成するオブジェクト数不一致警告処理部とを有することを特徴とするオブジェクト数調整装置が提供される。   According to one aspect of the present invention, an apparatus for adjusting the number of objects described in an object definition file generated by a configurator based on a configuration information file, which reads an application source program and describes it in the application source program A parameter extraction processing unit that extracts a parameter of a service call generated to generate a parameter database for each service call, and extracts a maximum value of an object ID of an object called by the service call by searching the parameter database for each object Object ID maximum value extraction processing unit for generating the object ID maximum value database, and the object ID maximum value described in the object ID maximum value database An object number mismatch warning processing unit that compares the number of objects described in the object definition file for each object and generates a number of object mismatch warning information when the values do not match; An adjustment device is provided.

また、本発明の別の一態様によれば、コンフィギュレーション情報ファイルに基づいてコンフィギュレータにより生成されるオブジェクト定義ファイルに記載されるオブジェクト数を調整する装置であって、アプリケーションソースプログラムを読み込んで前記アプリケーションソースプログラムに記述されたサービスコールのパラメータを抽出してサービスコールごとのパラメータデータベースを生成するパラメータ抽出処理部と、前記パラメータデータベースを検索して前記サービスコールが呼び出すオブジェクトのオブジェクトIDの最大値を抽出してオブジェクトごとのオブジェクトID最大値データベースを生成するオブジェクトID最大値抽出処理部と、前記オブジェクトID最大値データベースに記載された前記オブジェクトID最大値に合わせて前記オブジェクト定義ファイルに記載された前記オブジェクト数を書き換えた調整済みオブジェクト定義ファイルを生成するオブジェクト数調整処理部とを有することを特徴とするオブジェクト数調整装置が提供される。   According to another aspect of the present invention, there is provided an apparatus for adjusting the number of objects described in an object definition file generated by a configurator based on a configuration information file. A parameter extraction processing unit that extracts a service call parameter described in a source program and generates a parameter database for each service call; and searches the parameter database to extract a maximum value of an object ID of an object called by the service call An object ID maximum value extraction processing unit that generates an object ID maximum value database for each object, and the object described in the object ID maximum value database Object speed adjusting apparatus characterized by having a number of objects adjustment processing unit for generating an adjusted object definition file rewriting said number of objects listed in the object definition file in accordance with the D maximum value are provided.

また、本発明のさらに別の一態様によれば、コンフィギュレーション情報ファイルに基づいてコンフィギュレータにより生成されるオブジェクト定義ファイルに記載されるオブジェクト数を調整する装置であって、アプリケーションソースプログラムを読み込んで前記アプリケーションソースプログラムに記述されたサービスコールのパラメータを抽出してサービスコールごとのパラメータデータベースを生成するパラメータ抽出処理部と、前記パラメータデータベースを検索して前記サービスコールが呼び出すオブジェクトのオブジェクトIDの最大値を抽出してオブジェクトごとのオブジェクトID最大値データベースを生成するオブジェクトID最大値抽出処理部と、前記オブジェクトID最大値データベースに記載された前記オブジェクトID最大値に合わせて前記オブジェクト定義ファイルに記載された前記オブジェクト数を書き換えた調整済みオブジェクト定義ファイルを生成するオブジェクト数調整処理部と、前記調整済みオブジェクト定義ファイルを用いて実行した前記アプリケーションソースプログラムの実行履歴を解析して前記オブジェクトごとのオブジェクトIDの最大値を検出し、その値が前記オブジェクトID最大値データベースに記載された前記オブジェクトID最大値と異なるときは、前記調整済みオブジェクト定義ファイルに記載されたオブジェクト数を前記実行履歴から検出したオブジェクトID最大値に書き換える実行履歴解析処理部とを有することを特徴とするオブジェクト数調整装置が提供される。   According to yet another aspect of the present invention, there is provided an apparatus for adjusting the number of objects described in an object definition file generated by a configurator based on a configuration information file, which reads an application source program and A parameter extraction processing unit that extracts a service call parameter described in an application source program and generates a parameter database for each service call; and a maximum object ID of an object that the service call calls by searching the parameter database An object ID maximum value extraction processing unit that extracts and generates an object ID maximum value database for each object; and the object described in the object ID maximum value database. An object number adjustment processing unit for generating an adjusted object definition file in which the number of objects described in the object definition file is rewritten in accordance with an object ID maximum value, and the application source executed using the adjusted object definition file The execution history of the program is analyzed to detect the maximum value of the object ID for each object, and when the value is different from the maximum value of the object ID described in the object ID maximum value database, the adjusted object definition file And an execution history analysis processing unit that rewrites the number of objects described in the above to the maximum object ID value detected from the execution history.

本発明によれば、オブジェクト定義ファイルに記載されたオブジェクト数をアプリケーションプログラムで使用するオブジェクト数に整合させることができるので、ROM/RAMに不使用領域を生じることがなくROM/RAMを効率よく使用することができる。また、アプリケーションソースプログラム実行時のエラーを回避することができる。   According to the present invention, since the number of objects described in the object definition file can be matched with the number of objects used in the application program, the ROM / RAM can be used efficiently without causing an unused area in the ROM / RAM. can do. Further, it is possible to avoid an error when executing the application source program.

以下、本発明の実施例を図面を参照して説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は、本発明の実施例1に係るオブジェクト数調整装置の構成を示すブロック図である。   FIG. 1 is a block diagram illustrating the configuration of the object number adjusting apparatus according to the first embodiment of the invention.

オブジェクト数調整装置101は、パラメータ抽出処理部11と、オブジェクトID最大値抽出処理部12と、オブジェクト数不一致警告処理部15からなる。   The object number adjusting apparatus 101 includes a parameter extraction processing unit 11, an object ID maximum value extraction processing unit 12, and an object number mismatch warning processing unit 15.

パラメータ抽出処理部11は、アプリケーションソースプログラム21と、オブジェクトごとに整理されたサービスコール一覧が記述されているサービスコールデータベース22を読み込んで、サービスコールデータベース22に定義されているサービスコールを使用している箇所をアプリケーションソースプログラム21から抜き出し、それぞれのサービスコールへ渡すパラメータを抽出してパラメータデータベース23へ書き込む。   The parameter extraction processing unit 11 reads the application source program 21 and the service call database 22 in which the service call list arranged for each object is described, and uses the service calls defined in the service call database 22. Are extracted from the application source program 21, parameters to be passed to each service call are extracted and written to the parameter database 23.

オブジェクトID最大値抽出処理部12は、パラメータデータベース23を読み込んでパラメータの中のオブジェクトID部分を抽出し、その最大値をオブジェクトID最大値としてオブジェクトID最大値データベース24へ書き込む。   The object ID maximum value extraction processing unit 12 reads the parameter database 23, extracts the object ID portion of the parameter, and writes the maximum value as the object ID maximum value in the object ID maximum value database 24.

オブジェクト数不一致警告処理部15は、コンフィギュレーションファイル31をC言語プリプロセッサ32を通した後コンフィギュレータで処理して得られるオブジェクト定義ファイル34とオブジェクトID最大値データベース24を読み込んで、オブジェクト定義ファイル34に記載されているオブジェクト数とオブジェクトID最大値データベース24に書き込まれているオブジェクトID最大値をオブジェクトごとに比較する。もし、その数が一致しない場合は、オブジェクト数不一致警告情報25を出力する。   The object number mismatch warning processing unit 15 reads the object definition file 34 and the object ID maximum value database 24 obtained by processing the configuration file 31 through the C language preprocessor 32 and then by the configurator, and describes them in the object definition file 34. The object ID maximum value written in the object ID maximum value database 24 is compared for each object. If the numbers do not match, the object number mismatch warning information 25 is output.

次に、このオブジェクト数調整装置101における処理の実行例を図2から図7を用いて説明する。   Next, an execution example of processing in the object number adjusting apparatus 101 will be described with reference to FIGS.

図2は、C言語で記述したアプリケーションソースプログラム21の例である。この例では、オブジェクトの一つであるセマフォを呼び出すサービスコールの記述部分を抜き出して示している。   FIG. 2 is an example of the application source program 21 written in C language. In this example, a description part of a service call for calling a semaphore that is one of objects is extracted and shown.

この例では、サービスコールとしてwai_sem、sig_sem、pol_sem、twai_semが用いられている。これらのサービスコールの後の括弧内に記されているものがパラメータであり、このパラメータがオブジェクトすなわちセマフォのID番号を示している。   In this example, wai_sem, sig_sem, pol_sem, and twai_sem are used as service calls. What is written in parentheses after these service calls is a parameter, and this parameter indicates the ID number of the object, that is, the semaphore.

ここで、パラメータはSEMID1、SEMID2、SEMID3と表わされており、それぞれ、define文でその数値、SEMID1=1、SEMID2=2、SEMID3=3が定義されている。すなわち、ここでは、ID番号1から3の3つのセマフォが使われている。   Here, the parameters are represented as SEMID1, SEMID2, and SEMID3, and the numeric values, SEMID1 = 1, SEMID2 = 2, and SEMID3 = 3 are defined in the define statement, respectively. That is, here, three semaphores with ID numbers 1 to 3 are used.

図3は、サービスコールデータベース22に記載されているサービスコール一覧の例である。ここでは、セマフォを呼び出すサービスコールの一覧を示している。   FIG. 3 is an example of a service call list described in the service call database 22. Here, a list of service calls that call semaphores is shown.

図4は、パラメータ抽出処理部11で生成されるパラメータデータベース23の例である。ここでは、図2のアプリケーションソースプログラム21の例から図3に示すセマフォに関するサービスコールを使用している部分を抜き出し、そのサービスコールへ渡すID番号に相当するパラメータとともに列挙している。   FIG. 4 is an example of the parameter database 23 generated by the parameter extraction processing unit 11. Here, the part using the service call related to the semaphore shown in FIG. 3 is extracted from the example of the application source program 21 shown in FIG. 2 and listed together with the parameter corresponding to the ID number passed to the service call.

図5は、オブジェクトID最大値抽出処理部12で生成されるオブジェクトID最大値データベース24の例である。ここでは、図4に示したセマフォに関するサービスコールのID番号に相当するパラメータをパラメータデータベース23から読み取って、セマフォに与えられたID番号の最大値を抽出して記述した例を示している。   FIG. 5 is an example of the object ID maximum value database 24 generated by the object ID maximum value extraction processing unit 12. Here, an example is described in which a parameter corresponding to the ID number of the service call related to the semaphore shown in FIG. 4 is read from the parameter database 23 and the maximum value of the ID number given to the semaphore is extracted and described.

この場合、セマフォに関するサービスコールのID番号に相当するパラメータとしては、図4に示すようにSEMID1、SEMID2、SEMID3が与えられているが、この中の最大値はSEMID3として定義されている3である。したがって、図5に示すようにセマフォに対するオブジェクトIDの最大値としては3が記される。   In this case, SEMID1, SEMID2, and SEMID3 are given as parameters corresponding to the ID number of the service call related to the semaphore as shown in FIG. 4, and the maximum value among them is 3 defined as SEMID3. . Therefore, as shown in FIG. 5, 3 is written as the maximum value of the object ID for the semaphore.

一方、図6は、コンフィギュレータ33から出力されたオブジェクト定義ファイル34の例を示したものである。ここでは、セマフォに対するコントロールブロックを定義している部分を示している。ここで、SCB scb[8]の記述が、セマフォに対して定義されたオブジェクト数に相応してコントロールブロックを8個生成することを示している。これは、コンフィギュレーション情報31にてセマフォを8個使用することが定義されていることを意味する。   On the other hand, FIG. 6 shows an example of the object definition file 34 output from the configurator 33. Here, the part defining the control block for the semaphore is shown. Here, the description of SCB scb [8] indicates that eight control blocks are generated in accordance with the number of objects defined for the semaphore. This means that the configuration information 31 defines that eight semaphores are used.

図7は、オブジェクト数不一致警告処理部15から出力されるオブジェクト数不一致警告情報25の例である。ここでは、セマフォに関して、図5に示すオブジェクトID最大値データベース24に記されたオブジェクトID最大値と図6に示すオブジェクト定義ファイル34から判明したオブジェクトの定義された使用数との間に不一致があることを警告している。すなわち、8個定義されているオブジェクト数に対してアプリケーションソースプログラム21で使用しているオブジェクトIDの最大値が3であり、オブジェクトIDの最大値に対して定義数が過剰であることを警告している。   FIG. 7 is an example of the object number mismatch warning information 25 output from the object number mismatch warning processing unit 15. Here, regarding the semaphore, there is a discrepancy between the object ID maximum value written in the object ID maximum value database 24 shown in FIG. 5 and the defined number of objects found from the object definition file 34 shown in FIG. Warn you. That is, a warning is given that the maximum value of the object ID used in the application source program 21 is 3 for the number of objects defined by 8 and the number of definitions is excessive for the maximum value of the object ID. ing.

このように、本実施例では、オブジェクト定義ファイルに定義されているオブジェクトの数と、アプリケーションソースファイルで使用しているオブジェクトIDの最大値との間の不一致の情報が出力されるため、この情報に基づいて、ユーザはコンフィギュレーション情報に記述しているオブジェクト数の修正を行うことができる。   As described above, in this embodiment, information on the mismatch between the number of objects defined in the object definition file and the maximum value of the object ID used in the application source file is output. Based on the above, the user can correct the number of objects described in the configuration information.

図8は、本発明の実施例2に係るオブジェクト数調整装置の構成を示すブロック図である。   FIG. 8 is a block diagram illustrating the configuration of the object number adjusting apparatus according to the second embodiment of the present invention.

本実施例のオブジェクト数調整装置1が実施例1のオブジェクト数調整装置101と異なる点は、オブジェクト数調整装置101のオブジェクト数不一致警告処理部15の代わりにオブジェクト数調整処理部13を有している点である。その他は、実施例1のオブジェクト数調整装置101と同一であるので、図2において図1と同一の部分は図1と同一の符号を付し、ここではその詳細な説明を省略する。   The object number adjusting apparatus 1 of the present embodiment is different from the object number adjusting apparatus 101 of the first embodiment in that an object number adjustment processing unit 13 is provided instead of the object number mismatch warning processing unit 15 of the object number adjusting apparatus 101. It is a point. Others are the same as those of the object number adjusting apparatus 101 of the first embodiment. Therefore, the same reference numerals in FIG. 2 as those in FIG. 1 are given the same reference numerals as those in FIG.

オブジェクト数調整処理部13は、オブジェクト定義ファイル34とオブジェクトID最大値データベース24を読み込んで、オブジェクト定義ファイル34に記載されているオブジェクト数とオブジェクトID最大値データベース24に書き込まれているオブジェクトID最大値をオブジェクトごとに比較する。もし、その数が一致しない場合は、オブジェクト定義ファイル34に記載されているオブジェクト数をオブジェクトID最大値に書き換えて調整済みオブジェクト定義ファイル26を出力する。また、このときオブジェクト数不一致警告情報25も出力する。   The object number adjustment processing unit 13 reads the object definition file 34 and the object ID maximum value database 24, and reads the object number and object ID maximum value written in the object ID maximum value database 24 in the object definition file 34. Are compared for each object. If the numbers do not match, the number of objects described in the object definition file 34 is rewritten to the object ID maximum value, and the adjusted object definition file 26 is output. At this time, the object number mismatch warning information 25 is also output.

図9は、このオブジェクト数調整処理部13が出力する調整済みオブジェクト定義ファイル26の例である。ここでは、図6に示したオブジェクト定義ファイル34の例に対して、図5に示したオブジェクトID最大値データベース24の例に基づきセマフォコントロールブロック定義文に記載されたセマフォのオブジェクト数を書き換えた例を示している。すなわち、セマフォのオブジェクト数が8から3に修正されている。   FIG. 9 is an example of the adjusted object definition file 26 output by the object number adjustment processing unit 13. Here, an example in which the number of semaphore objects described in the semaphore control block definition statement is rewritten based on the example of the object ID maximum value database 24 shown in FIG. 5 with respect to the example of the object definition file 34 shown in FIG. Is shown. That is, the number of objects in the semaphore is corrected from 8 to 3.

なお、このオブジェクト数調整処理部13から出力されるオブジェクト数不一致警告情報25は、実施例1と同じであり、その例は図4に示される。   The object number mismatch warning information 25 output from the object number adjustment processing unit 13 is the same as that in the first embodiment, and an example thereof is shown in FIG.

このように、本実施例では、オブジェクト定義ファイルに定義されているオブジェクトの数が、アプリケーションソースファイルで使用しているオブジェクトIDの最大値に合わせて修正されるため、ユーザは、コンフィギュレーション情報の修正を行わなくとも、オブジェクトIDの最大値に合致したオブジェクト数が記載されたオブジェクト定義ファイルを得ることができる。また、ユーザは、オブジェクト数不一致警告情報により、オブジェクト定義ファイル中のオブジェクト数が書き換えられたことを知ることができる。   As described above, in this embodiment, the number of objects defined in the object definition file is corrected according to the maximum value of the object ID used in the application source file. Even without correction, an object definition file in which the number of objects that match the maximum value of the object ID is described can be obtained. Further, the user can know from the object number mismatch warning information that the number of objects in the object definition file has been rewritten.

図10は、本発明の実施例3に係るオブジェクト数調整装置の構成を示すブロック図である。   FIG. 10 is a block diagram illustrating the configuration of the object number adjusting apparatus according to the third embodiment of the present invention.

本実施例のオブジェクト数調整装置201は、実施例2のオブジェクト数調整装置1にさらに実行履歴解析処理部14を追加したものである。そこで、図3において図2にと同一の部分には同一の符号を付し、ここではその詳細な説明を省略する。   The object number adjusting device 201 of the present embodiment is obtained by further adding an execution history analysis processing unit 14 to the object number adjusting device 1 of the second embodiment. Therefore, in FIG. 3, the same parts as those in FIG. 2 are denoted by the same reference numerals, and detailed description thereof is omitted here.

実行履歴解析処理部14へは、アプリケーションソースプログラム21をコンパイラ/リンカ41により変換された実行可能プログラム43をデバッガ44で実行した結果得られるサービスコールの実行ログ45が入力される。なお、コンパイラ/リンカ41へは、調整済みオブジェクト定義ファイル26およびカーネルライブラリ42が入力される。   To the execution history analysis processing unit 14, a service call execution log 45 obtained as a result of executing the executable program 43 obtained by converting the application source program 21 by the compiler / linker 41 with the debugger 44 is input. Note that the adjusted object definition file 26 and the kernel library 42 are input to the compiler / linker 41.

実行履歴解析処理部14は、入力されたサービスコールの実行ログ45を解析し、デバッガ44が蓄積したサービスコールの実行履歴からサービスコールのパラメータに指定されたオブジェクトIDの最大値を検出する。その後、この検出したオブジェクトIDの最大値とオブジェクトID最大値データベース24に書き込まれているオブジェクトID最大値とをオブジェクトごとに比較する。その結果、その数の間に不一致があったときは、調整済みオブジェクト定義ファイル26に記載されているオブジェクト数をサービスコールの実行ログ45から検出されたオブジェクトID最大値に書き換える。   The execution history analysis processing unit 14 analyzes the input service call execution log 45 and detects the maximum value of the object ID specified as the service call parameter from the service call execution history accumulated by the debugger 44. Thereafter, the maximum value of the detected object ID is compared with the maximum value of the object ID written in the object ID maximum value database 24 for each object. As a result, when there is a discrepancy between the numbers, the number of objects described in the adjusted object definition file 26 is rewritten with the maximum object ID detected from the service call execution log 45.

このように、本実施例では、オブジェクト定義ファイルに定義されているオブジェクトの数を、アプリケーションソースプログラムを実際に実行した結果に合わせて修正することができる。   Thus, in the present embodiment, the number of objects defined in the object definition file can be corrected according to the result of actually executing the application source program.

本発明の実施例1に係るオブジェクト数調整装置の構成を示すブロック図。1 is a block diagram showing a configuration of an object number adjusting device according to Embodiment 1 of the present invention. アプリケーションソースプログラムの例を示す図。The figure which shows the example of an application source program. サービスコール一覧を記述したデータファイルの例を示す図。The figure which shows the example of the data file which described the service call list. 本発明の実施例に係るオブジェクト数調整装置が生成するパラメータデータベースの例を示す図。The figure which shows the example of the parameter database which the object number adjustment apparatus which concerns on the Example of this invention produces | generates. 本発明の実施例に係るオブジェクト数調整装置が生成するオブジェクトID最大値データベースの例を示す図。The figure which shows the example of the object ID maximum value database which the object number adjustment apparatus which concerns on the Example of this invention produces | generates. コンフィギュレータから生成されるオブジェクト定義ファイルの例を示す図。The figure which shows the example of the object definition file produced | generated from a configurator. 本発明の実施例に係るオブジェクト数調整装置が生成するオブジェクト数警告情報の例を示す図。The figure which shows the example of the object number warning information which the object number adjustment apparatus which concerns on the Example of this invention produces | generates. 本発明の実施例2に係るオブジェクト数調整装置の構成を示すブロック図。The block diagram which shows the structure of the object number adjustment apparatus which concerns on Example 2 of this invention. 本発明の実施例に係るオブジェクト数調整装置が生成する調整済みオブジェクト定義ファイルの例を示す図。The figure which shows the example of the adjusted object definition file which the object number adjustment apparatus which concerns on the Example of this invention produces | generates. 本発明の実施例3に係るオブジェクト数調整装置の構成を示すブロック図。The block diagram which shows the structure of the object number adjustment apparatus which concerns on Example 3 of this invention.

符号の説明Explanation of symbols

1、101、201 オブジェクト数調整装置
11 パラメータ抽出処理部
12 オブジェクトID最大値抽出処理部
13 オブジェクト数調整処理部
14 実行履歴解析処理部
15 オブジェクト数不一致警告処理部
21 アプリケーションソースプログラム
22 サービスコールデータベース
23 パラメータデータベース
24 オブジェクトID最大値データベース
25 オブジェクト数不一致警告情報
26 調整済みオブジェクト定義ファイル
31 コンフィギュレーション情報
32 C言語プリプロセッサ
33 コンフィギュレータ
34 オブジェクト定義ファイル
41 コンパイラ/リンカ
42 カーネルライブラリ
43 実行可能プログラム
44 デバッガ
45 サービスコールの実行ログ
1, 101, 201 Object Number Adjustment Device 11 Parameter Extraction Processing Unit 12 Object ID Maximum Value Extraction Processing Unit 13 Object Number Adjustment Processing Unit 14 Execution History Analysis Processing Unit 15 Object Number Mismatch Warning Processing Unit 21 Application Source Program 22 Service Call Database 23 Parameter database 24 Object ID maximum value database 25 Object number mismatch warning information 26 Adjusted object definition file 31 Configuration information 32 C preprocessor 33 Configurator 34 Object definition file 41 Compiler / linker 42 Kernel library 43 Executable program 44 Debugger 45 Service call Execution log

Claims (3)

コンフィギュレーション情報ファイルに基づいてコンフィギュレータにより生成されるオブジェクト定義ファイルに記載されるオブジェクト数を調整する装置であって、
アプリケーションソースプログラムを読み込んで前記アプリケーションソースプログラムに記述されたサービスコールのパラメータを抽出してサービスコールごとのパラメータデータベースを生成するパラメータ抽出処理部と、
前記パラメータデータベースを検索して前記サービスコールが呼び出すオブジェクトのオブジェクトIDの最大値を抽出してオブジェクトごとのオブジェクトID最大値データベースを生成するオブジェクトID最大値抽出処理部と、
前記オブジェクトID最大値データベースに記載された前記オブジェクトID最大値と前記オブジェクト定義ファイルに記載された前記オブジェクト数を前記オブジェクトごとに比較してその値が不一致のときはオブジェクト数不一致警告情報を生成するオブジェクト数不一致警告処理部と
を有することを特徴とするオブジェクト数調整装置。
An apparatus for adjusting the number of objects described in an object definition file generated by a configurator based on a configuration information file,
A parameter extraction processing unit that reads an application source program and extracts service call parameters described in the application source program to generate a parameter database for each service call;
An object ID maximum value extraction processing unit that searches the parameter database and extracts a maximum value of an object ID of an object called by the service call to generate an object ID maximum value database for each object;
The object ID maximum value described in the object ID maximum value database is compared with the number of objects described in the object definition file for each object, and when the values do not match, object number mismatch warning information is generated. An object number adjustment device, comprising: an object number mismatch warning processing unit.
コンフィギュレーション情報ファイルに基づいてコンフィギュレータにより生成されるオブジェクト定義ファイルに記載されるオブジェクト数を調整する装置であって、
アプリケーションソースプログラムを読み込んで前記アプリケーションソースプログラムに記述されたサービスコールのパラメータを抽出してサービスコールごとのパラメータデータベースを生成するパラメータ抽出処理部と、
前記パラメータデータベースを検索して前記サービスコールが呼び出すオブジェクトのオブジェクトIDの最大値を抽出してオブジェクトごとのオブジェクトID最大値データベースを生成するオブジェクトID最大値抽出処理部と、
前記オブジェクトID最大値データベースに記載された前記オブジェクトID最大値に合わせて前記オブジェクト定義ファイルに記載された前記オブジェクト数を書き換えた調整済みオブジェクト定義ファイルを生成するオブジェクト数調整処理部と
を有することを特徴とするオブジェクト数調整装置。
An apparatus for adjusting the number of objects described in an object definition file generated by a configurator based on a configuration information file,
A parameter extraction processing unit that reads an application source program and extracts service call parameters described in the application source program to generate a parameter database for each service call;
An object ID maximum value extraction processing unit that searches the parameter database and extracts a maximum value of an object ID of an object called by the service call to generate an object ID maximum value database for each object;
An object number adjustment processing unit that generates an adjusted object definition file in which the number of objects described in the object definition file is rewritten in accordance with the object ID maximum value described in the object ID maximum value database. Characteristic object number adjusting device.
コンフィギュレーション情報ファイルに基づいてコンフィギュレータにより生成されるオブジェクト定義ファイルに記載されるオブジェクト数を調整する装置であって、
アプリケーションソースプログラムを読み込んで前記アプリケーションソースプログラムに記述されたサービスコールのパラメータを抽出してサービスコールごとのパラメータデータベースを生成するパラメータ抽出処理部と、
前記パラメータデータベースを検索して前記サービスコールが呼び出すオブジェクトのオブジェクトIDの最大値を抽出してオブジェクトごとのオブジェクトID最大値データベースを生成するオブジェクトID最大値抽出処理部と、
前記オブジェクトID最大値データベースに記載された前記オブジェクトID最大値に合わせて前記オブジェクト定義ファイルに記載された前記オブジェクト数を書き換えた調整済みオブジェクト定義ファイルを生成するオブジェクト数調整処理部と、
前記調整済みオブジェクト定義ファイルを用いて実行した前記アプリケーションソースプログラムの実行履歴を解析して前記オブジェクトごとのオブジェクトIDの最大値を検出し、その値が前記オブジェクトID最大値データベースに記載された前記オブジェクトID最大値と異なるときは前記調整済みオブジェクト定義ファイルに記載されたオブジェクト数を前記実行履歴から検出したオブジェクトID最大値に書き換える実行履歴解析処理部と
を有することを特徴とするオブジェクト数調整装置。
An apparatus for adjusting the number of objects described in an object definition file generated by a configurator based on a configuration information file,
A parameter extraction processing unit that reads an application source program and extracts service call parameters described in the application source program to generate a parameter database for each service call;
An object ID maximum value extraction processing unit that searches the parameter database and extracts a maximum value of an object ID of an object called by the service call to generate an object ID maximum value database for each object;
An object number adjustment processing unit that generates an adjusted object definition file in which the number of objects described in the object definition file is rewritten in accordance with the object ID maximum value described in the object ID maximum value database;
The execution history of the application source program executed using the adjusted object definition file is analyzed to detect the maximum value of the object ID for each object, and the value is recorded in the object ID maximum value database. An object number adjusting apparatus comprising: an execution history analysis processing unit that rewrites the number of objects described in the adjusted object definition file to the maximum object ID value detected from the execution history when different from the maximum ID value.
JP2003386382A 2003-11-17 2003-11-17 Object number adjusting device Pending JP2005149179A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003386382A JP2005149179A (en) 2003-11-17 2003-11-17 Object number adjusting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003386382A JP2005149179A (en) 2003-11-17 2003-11-17 Object number adjusting device

Publications (1)

Publication Number Publication Date
JP2005149179A true JP2005149179A (en) 2005-06-09

Family

ID=34694081

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003386382A Pending JP2005149179A (en) 2003-11-17 2003-11-17 Object number adjusting device

Country Status (1)

Country Link
JP (1) JP2005149179A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9836289B2 (en) 2015-11-06 2017-12-05 Renesas Electronics Corporation Executable code generation program and executable code generation device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9836289B2 (en) 2015-11-06 2017-12-05 Renesas Electronics Corporation Executable code generation program and executable code generation device

Similar Documents

Publication Publication Date Title
JP5551262B2 (en) Context-sensitive slice processing for dynamically parallelizing binary programs
CN106843840B (en) Source code version evolution annotation multiplexing method based on similarity analysis
CN106469049B (en) File scanning method and device
EP3379443A1 (en) Method and computer device to deobfuscate a source code
CN107451045A (en) A kind of method and device of abnormal information positioning
CN111580821B (en) Script binding method and device, electronic equipment and computer readable storage medium
US11068463B2 (en) System and method for managing log data
JP5041990B2 (en) Software component extraction support device
JP2005149179A (en) Object number adjusting device
CN111158667A (en) Code injection method and device, electronic equipment and storage medium
JP6665576B2 (en) Support device, support method, and program
JP2011113147A (en) Source analysis program, preprocessor, lexer and syntax tree analysis program
US20110167417A1 (en) Programming system in multi-core, and method and program of the same
JP5385103B2 (en) Macro expansion method and preprocessor
US8510342B1 (en) Automatic conversion of build processes to use streaming input
KR101904643B1 (en) Article generation method using the decision tree
JP2009129133A (en) Software partial test system, software partial test method, and program for software partial test
JP6579022B2 (en) Generating program, generating method, and generating apparatus
JP6453685B2 (en) Arithmetic control device, arithmetic control method, and arithmetic control program
Tsantalis et al. Refactoring clones: A new perspective
JP6447358B2 (en) Source code generation program, source code generation method, and computer
CN114675878B (en) Jump instruction data acquisition method and device, electronic equipment and storage medium
JP4371000B2 (en) IDL compiling device, IDL compiling method, and IDL compiler
JP3004340B2 (en) Program optimization device
JPH08137714A (en) Debugging method and debugging system for multitask program

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20050428

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20050606