JPH0784773A - Automatic totalization program generator - Google Patents
Automatic totalization program generatorInfo
- Publication number
- JPH0784773A JPH0784773A JP22929793A JP22929793A JPH0784773A JP H0784773 A JPH0784773 A JP H0784773A JP 22929793 A JP22929793 A JP 22929793A JP 22929793 A JP22929793 A JP 22929793A JP H0784773 A JPH0784773 A JP H0784773A
- Authority
- JP
- Japan
- Prior art keywords
- program
- specifications
- aggregate
- aggregation
- totalization
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Stored Programmes (AREA)
Abstract
(57)【要約】
【目的】集計プログラムの仕様を定められた形式の仕様
記述言語により記述し、プログラム自動生成装置を動作
させるだけで、集計プログラムを自動的に得る。
【構成】仕様書解析部101は、プログラム仕様書2と
して入力されたデータ項目および複数の集計動作仕様を
解析して集計プログラム仕様内部表現102を得る。起
動タイミング判定部103は、解析された各集計動作仕
様を各々の起動タイミングに基づいて分類し、起動タイ
ミング別集計プログラム仕様104を得る。動作条件判
定部105は、各々の起動タイミング毎にそれに対応す
る集計動作を調べ、集計動作が複数個ある起動タイミン
グについてはどの動作条件の項目を最初に判定するのが
最適かを判定し、起動タイミング毎にどの集計動作を行
うか記述した集計プログラム内部表現106を得る。集
計プログラム出力部107は、集計プログラム内部表現
106を集計プログラム4として出力する。
(57) [Summary] [Purpose] The totalization program is automatically obtained by describing the specifications of the totalization program in a specified format description language and operating the automatic program generation device. [Structure] A specification analysis unit 101 analyzes a data item input as a program specification 2 and a plurality of tabulation operation specifications to obtain a tabulation program specification internal representation 102. The start timing determination unit 103 classifies the analyzed totaling operation specifications based on the respective start timings, and obtains the start timing-specific totaling program specifications 104. The operating condition determination unit 105 checks the totaling operation corresponding to each start timing, determines which operating condition item is the first to be determined for the start timing having a plurality of totaling operations, and starts the start operation. An aggregating program internal representation 106 describing which aggregating operation is performed at each timing is obtained. The tally program output unit 107 outputs the tally program internal representation 106 as the tally program 4.
Description
【0001】[0001]
【産業上の利用分野】本発明は、事象起動型のプログラ
ム言語を使用して集計プログラムの仕様を定義し、この
定義された仕様に基づいて集計プログラムを自動的に生
成する装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus for defining a specification of a counting program using an event-triggered programming language and automatically generating the counting program based on the defined specification.
【0002】[0002]
【従来の技術】集計プログラムとは、いくつかのデータ
を順次受信し、その中で特定の条件を満たしているデー
タの数、データに含まれる特定の値の合計、データ内の
特定の項目に対して演算を施した結果の合計等を計算
し、集計結果報告の要求があったとき、これらの集計結
果を報告するプログラムである。2. Description of the Related Art A tally program is used to receive several pieces of data in sequence, to find out the number of pieces of data that meet certain conditions, the sum of certain values contained in the data, and the specific items in the data. It is a program that calculates the total of the results of the calculations and reports these total results when requested to report the total results.
【0003】集計プログラムを開発する場合には、まず ・どのような名称の項目を集計するか ・各集計項目はに対してどのような演算が求められる
か、すなわち該当するデータを発見する度に値を1ずつ
増やすのか、データに含まれる適当な値を加算するのか
等 ・複数の集計項目の合計、平均などの統計データは必要
としているか。その項目の名称は何か、それらはどのよ
うな計算式で求めることができるか ・各集計項目はどのような形式の報告を求められるか ・各集計項目はいつゼロクリアするか といったことを集計プログラム仕様書として定義する。
次に開発者はこの集計プログラム仕様書をもとに、集計
プログラムを開発する。When developing a totaling program, first, what kind of item is to be totaled, what kind of calculation is required for each totaling item, that is, each time the corresponding data is discovered. Whether to increase the value by 1 or add an appropriate value included in the data, etc.-Do you need statistical data such as the sum and average of multiple aggregation items? What is the name of the item, what kind of formula can be used to calculate them, what type of report is required for each aggregated item, and when is the aggregated program to be cleared to zero? Define as a specification.
Next, the developer develops a tally program based on this tally program specification.
【0004】[0004]
【発明が解決しようとする課題】ところが、集計項目が
多く、しかも集計するべき条件が複雑な場合には、集計
プログラムを誤りなく開発することは困難であり、ま
た、長い開発時間が必要であった。However, when there are many items to be aggregated and the conditions to be aggregated are complicated, it is difficult to develop an aggregation program without error, and a long development time is required. It was
【0005】このような問題点を解決するために、従来
から、種々のプログラム生成手法が提案されている。た
とえば、特開平3−138729号公報に記載の「項書
き換えによるプログラム変換処理方式」は、項書換部と
複数の書き換えルールとを有する計算機言語処理システ
ムに対してプログラムを規定する入力データを入力する
と、この入力データに対して各書き換えルールを順次適
用していき、書換結果を実行可能としたプログラムとし
て出力するものである。しかし、このような入力データ
に対して書き換えルールを適用するプログラムの生成手
法は、多くの場合複雑な記述を単純化するために用いら
れており、集計プログラムのように、仕様が複雑なプロ
グラムの生成には、書き換えルールが膨大なものになっ
てしまい、不適当であった。In order to solve such a problem, various program generating methods have been conventionally proposed. For example, in the "program conversion processing method by term rewriting" disclosed in Japanese Patent Laid-Open No. 3-138729, when input data defining a program is input to a computer language processing system having a term rewriting unit and a plurality of rewriting rules. The rewriting rules are sequentially applied to this input data, and the rewriting result is output as an executable program. However, the method of generating a program that applies a rewrite rule to such input data is often used to simplify a complicated description, and a program with a complicated specification such as an aggregation program is often used. It was unsuitable for generation because the rewriting rules became huge.
【0006】また、特開平3−286226号公報に記
載の「プログラム生成方法およびシステム」は、処理す
るデータ項目に対し、データを操作するための処理と、
このデータ操作を制御する条件とによりプログラムの仕
様を定義してソースプログラムを生成するものであっ
て、特に、前記条件および処理を各々表形式で定義した
ものである。確かに、この従来技術によれば、処理する
データ項目についての条件とその処理を表中に記入する
ことにより、プログラムの仕様が決定されるため、仕様
記述上の不統一がなくなり、記述自体も容易になるの
で、仕様をもとにしたプログラムの生成が容易に実施で
きる。しかし、この従来技術でも、プログラム自体の生
成は、従来から採用されていた時系列タイプのプログラ
ム言語によってなされているので、集計プログラムのよ
うに、要求される仕様が必ずしも時系列に沿って発生し
ないプログラムを生成するには適していなかった。ま
た、集計プログラムでは、プログラムの仕様を決定する
条件や処理を表形式で記載することが困難な場合もあっ
て、このような表形式を前提とするこの従来技術を採用
できないこともあった。Further, the "program generation method and system" described in Japanese Patent Laid-Open No. 3-286226 discloses a process for manipulating data for a data item to be processed.
The source program is generated by defining the program specifications by the conditions for controlling the data operation, and in particular, the conditions and the processes are defined in a table format. Certainly, according to this conventional technique, the condition of the data item to be processed and the process thereof are entered in the table to determine the program specifications, so that there is no inconsistency in the specification description and the description itself. Since it becomes easy, a program can be easily generated based on the specifications. However, even in this conventional technique, since the program itself is generated by the time-series type programming language that has been conventionally adopted, the required specifications do not always occur in a time-series manner like the aggregation program. Not suitable for generating programs. In addition, in the aggregation program, it is sometimes difficult to describe the conditions and processes that determine the specifications of the program in a tabular format, and this conventional technique based on such a tabular format may not be adopted.
【0007】さらに、前記のような従来技術の問題点を
解決するために、最近では、特開昭3−98127号公
報に記載の「事象起動型プログラム言語」のように、事
象が離散的に発生しする場合に、その事象毎に夫々の処
理を行うのに適したプログラム言語が提案されている。
この事象起動型のプログラム言語によってプログラムを
作成する場合は、時間順序を考慮することなく、事象を
もとにそれに対応する処理を羅列的に記載するだけで良
いので、従来の時系列的なプログラム言語に比較する
と、開発作業が容易になる。Further, in order to solve the above-mentioned problems of the prior art, recently, as in the "event activation type programming language" described in Japanese Patent Laid-Open No. 3-98127, events are discretely distributed. When it occurs, a programming language suitable for performing each processing for each event has been proposed.
When creating a program using this event-triggered programming language, it is only necessary to enumerate the processes corresponding to events based on events without considering the time sequence. Development work becomes easier when compared to languages.
【0008】ところが、前記の公報に開示された事象起
動型プログラム言語は、事象とこれによって起動する処
理とをプログラム記述の基本単位としているため、比較
的単純なプログラムにはそのまま適用することができて
も、本発明が対象とする集計プログラムのように複雑な
プログラムに対しては採用することが不可能であった。
すなわち、この従来技術は、事象とそれに対応する処
理、言い換えれば、条件とそれに対応する処理のみを事
象起動型プログラム言語として表現するものに過ぎない
から、集計プログラムのようにある特定のタイミングが
整った場合に、そのタイミングに応じた条件と処理が必
要となる複雑なプログラムについてそのまま使用するこ
とは不可能であった。However, the event-triggered programming language disclosed in the above publication uses events and the processes to be triggered by them as the basic unit of program description, and therefore can be applied to a relatively simple program as it is. However, it was not possible to adopt it for a complicated program such as the totalizing program targeted by the present invention.
That is, since this conventional technique only expresses the event and the process corresponding thereto, in other words, only the condition and the process corresponding thereto as an event-triggered programming language, a certain timing such as an aggregation program is set. In such a case, it was impossible to use it as it is for a complicated program that requires conditions and processing according to the timing.
【0009】本発明は前記のような従来技術の問題点、
すなわち開発される集計プログラムに誤りが発生し易い
こと、ならびに集計プログラムの開発に長い時間を要す
るという2つの問題点を解決するために提案されたもの
である。すなわち、本発明の目的は、開発者がユーザー
の要求を反映した集計プログラム仕様書を仕様記述言語
に基づいて記述することにより、実際のプログラミング
作業を行うことなく、集計プログラム仕様書に書かれた
内容を正確に反映した集計プログラムを直ちに得ること
ができる集計プログラム生成装置を提供することにあ
る。The present invention has the above-mentioned problems of the prior art,
That is, it is proposed in order to solve two problems that a totaling program to be developed is prone to errors and that it takes a long time to develop the totaling program. That is, the purpose of the present invention is to allow a developer to write an aggregate program specification reflecting a user's request based on a specification description language, so that the developer can write the aggregate program specification without actually performing programming work. It is an object of the present invention to provide a tallying program generation device that can immediately obtain a tallying program that accurately reflects the contents.
【0010】[0010]
【課題を解決するための手段】前記のような目的を達成
するために、本発明は、次のような手段を採用したこと
を特徴とする。なお、各請求項の発明に使用された用語
についての定義は、次の通りである。In order to achieve the above-mentioned object, the present invention is characterized by adopting the following means. The definitions of terms used in the invention of each claim are as follows.
【0011】(プログラム仕様書)データ項目と動作仕
様(集計動作仕様を含む)を記述したもの。キーワード
とそれに対応する記述によって仕様を記述することが好
ましい。 (データ項目)集計プログラムが取り扱うデータの項
目。プログラム仕様書に記載される。 (動作仕様)集計プログラムが対応する動作全般につい
ての仕様。集計動作仕様とその他の動作仕様を含む。プ
ログラム仕様書に記述される。 (集計動作仕様)動作仕様の中で、特に集計動作に関す
る仕様。仕様書への記述に当たっては、少なくとも、起
動タイミング、動作条件並びに動作内容を含む。(Program specification) A description of data items and operation specifications (including aggregate operation specifications). It is preferable to describe the specifications by keywords and corresponding descriptions. (Data item) An item of data handled by the aggregation program. Described in the program specifications. (Behavioral specifications) Specifications for the overall behavior of the aggregation program. Includes aggregate behavior specifications and other behavior specifications. Described in the program specification. (Aggregation operation specification) Among the operation specifications, the specification regarding the aggregation operation in particular. The description in the specification includes at least the start timing, the operating condition, and the operation content.
【0012】まず、請求項1の発明は、集計プログラム
で取り扱うデータ項目と、集計プログラムが実行する複
数の集計動作について、その起動タイミング、動作条件
並びに動作内容を含む集計動作仕様とを記述したプログ
ラム仕様書を入力し、入力されたプログラム仕様書から
データ項目および各集計動作仕様を解析する仕様書解析
部と、前記仕様書解析部で解析された各集計動作仕様
を、各々の起動タイミングに基づいて分類し、起動タイ
ミング別集計プログラム仕様を得る起動タイミング判定
部と、この起動タイミング別の集計プログラム仕様を実
行可能な集計プログラムとして出力する集計プログラム
出力部とを備えていることを特徴とする。First, the invention of claim 1 is a program in which data items handled by an aggregation program and aggregation operation specifications including start timings, operation conditions and operation contents of a plurality of aggregation operations executed by the aggregation program are described. A specification analysis unit that inputs specifications and analyzes data items and each aggregate operation specification from the input program specifications, and each aggregate operation specification analyzed by the specification analysis unit based on each start timing. The present invention is characterized by including a start timing determination unit that obtains the summation program specifications for each start timing, and a summation program output unit that outputs the summation program specifications for each start timing as an executable summation program.
【0013】請求項2の発明は、集計プログラムで取り
扱うデータ項目と、集計プログラムが実行する複数の集
計動作について、その起動タイミング、動作条件並びに
動作内容を含む集計動作仕様とを記述したプログラム仕
様書を入力し、入力されたプログラム仕様書からデータ
項目および各集計動作仕様を解析して集計プログラム仕
様内部表現を得る仕様書解析部と、前記仕様書解析部で
解析された各集計プログラム仕様内部表現を、各々の起
動タイミングに基づいて分類し、起動タイミング別集計
プログラム仕様を得る起動タイミング判定部と、前記起
動タイミング別集計プログラム仕様における各々の起動
タイミング毎にそれに対応する集計動作を調べ、集計動
作が複数個ある起動タイミングについてはどの順番で動
作条件の項目を判定するのが最適かを判定し、各起動タ
イミング毎にどのような条件のもとでどの集計動作を行
うか記述した集計プログラム内部表現を得る動作条件判
定順位決定部と、前記集計プログラム内部表現を、実行
可能な集計プログラムとして出力する集計プログラム出
力部とを備えていることを特徴とする。According to a second aspect of the present invention, a program specification describing the data items handled by the tabulation program and the tabulation operation specifications including the start timing, operation conditions and operation contents for a plurality of tabulation operations executed by the tabulation program. , And the specification analysis unit that obtains the internal representation of the totalization program specifications by analyzing the data items and each totalization operation specification from the input program specifications, and each internal representation of the totalization program specifications analyzed by the specification analysis unit. , A start timing determination unit that obtains an aggregate program specification for each start timing and an aggregate operation corresponding to each start timing in the aggregate program specifications for each start timing, and an aggregate operation If there are multiple start-up timings, determine the operating condition item in which order. The operation condition determination order determination unit that obtains the internal representation of the aggregation program that describes which aggregation operation is performed under each condition at each start timing and the aggregation program internal representation. And a totalization program output unit for outputting as an executable totalization program.
【0014】請求項3の発明は、前記各請求項に記載の
発明において、入力されたプログラム実現上の制約を解
析する制約解析部と、この制約解析部によって解析され
た制約と前記集計プログラム内部表現を、実行可能な集
計プログラムとして出力する集計プログラム出力部とを
備えていることを特徴とする。According to a third aspect of the present invention, in the invention according to each of the first and second aspects, a constraint analysis unit that analyzes a constraint in inputting a program, a constraint analyzed by the constraint analysis unit, and the inside of the total program. The present invention is characterized by comprising a totalization program output unit for outputting the expression as an executable totalization program.
【0015】請求項4の発明は、データ項目および各動
作仕様に含まれる起動タイミング、動作条件並びに動作
内容が、キーワードとそれに対応する記述とから構成さ
れていることを特徴とする。The invention of claim 4 is characterized in that the start timing, the operation condition and the operation content included in the data item and each operation specification are composed of a keyword and a description corresponding thereto.
【0016】[0016]
【作用】前記のような構成を有する請求項1の発明にお
いては、プログラム開発者が仕様書入力部に対してデー
タ項目と複数の集計動作仕様を記述したプログラム仕様
書を入力すると、仕様書に記述された前記各集計動作の
起動タイミング、動作条件およびそれに対応する動作内
容が、仕様書解析部によって本装置が理解できる形式に
解析される。次に、解析された各集計動作仕様を、起動
タイミング判定部により各々の起動タイミングに基づい
て分類し、タイミング別集計プログラム仕様を得る。こ
のタイミング別集計プログラム仕様において、各起動タ
イミング毎に分類された動作条件とそれに対応する動作
内容に関する部分は、従来公知の動作条件と動作内容を
記述する仕様記述言語によって記述することが可能であ
るから、本装置に入力する集計プログラム仕様書を予め
仕様記述言語によって記述しておけば、動作タイミング
を要求される複雑な集計プログラムであっても、タイミ
ング別集計プログラム仕様から実行可能な集計プログラ
ムを容易に生成することができる。According to the invention of claim 1 having the above-mentioned configuration, when the program developer inputs a program specification describing data items and a plurality of tabulation operation specifications into the specification input section, the specification is written in the specification. The start timing of each totaling operation, the operating condition, and the corresponding operation content described are analyzed by the specification analysis unit into a format understandable by the present apparatus. Next, the analyzed totaling operation specifications are classified by the start-timing determining unit based on the respective start-up timings to obtain the timing-specific totaling program specifications. In this timing-specific aggregate program specification, the operation condition classified for each start timing and the operation content corresponding thereto can be described by a conventionally known specification description language for describing the operation condition and operation content. Therefore, if the totalization program specifications to be input to this device are described in advance in the specification description language, even if a complicated totalization program is required for operation timing, the totalization program that can be executed from the timing-specific totalization program specifications It can be easily generated.
【0017】請求項2の発明においては、前記請求項1
の発明に加えて、動作条件判定順位決定部により、起動
タイミング別集計プログラム仕様における各々の起動タ
イミング毎にそれに対応する集計動作を調べ、集計動作
が複数個ある起動タイミングについてはどの動作条件の
項目を最初に判定するのが最適かを判定する。その結
果、どのような条件のもとでどのような動作内容を行な
う必要があるかを、最小の条件判定操作により判定で
き、実行効率に優れたプログラムを得ることができる。In the invention of claim 2, the above-mentioned claim 1
In addition to the invention described above, the operation condition determination order determination unit checks the aggregation operation corresponding to each activation timing in the aggregation program specification by activation timing, and the item of the operation condition for the activation timing having a plurality of aggregation operations. It is determined whether it is optimal to first determine. As a result, it is possible to determine what kind of operation content should be performed under what kind of condition by the minimum condition determining operation, and it is possible to obtain a program excellent in execution efficiency.
【0018】請求項3の発明においては、集計プログラ
ム仕様書によるデータ項目や動作仕様に加えて、プログ
ラム実現上の制約を実行可能な集計プログラムに反映さ
せることができる。According to the third aspect of the invention, in addition to the data items and operation specifications according to the totalization program specification, the restrictions on the program realization can be reflected in the executable totalization program.
【0019】請求項4の発明においては、データ項目及
び各動作仕様がキーワードを含む形で記述されているの
で、データ項目の判定や各動作仕様の解析が簡単に行う
ことができる。特に、動作仕様をキーワードに従って解
析することにより、起動タイミング判定部において、解
析された仕様の中から起動タイミングに関する仕様を選
択することが容易になる。In the invention of claim 4, since the data item and each operation specification are described in a form including the keyword, it is possible to easily judge the data item and analyze each operation specification. Particularly, by analyzing the operation specification according to the keyword, the start timing determination unit can easily select the specification regarding the start timing from the analyzed specifications.
【0020】[0020]
【実施例】以下に、本発明の一実施例に基づき、本発明
に係る内容を詳細に説明する。The content of the present invention will be described in detail below based on an embodiment of the present invention.
【0021】(1)装置の全体構成・・・図1 図1は本実施例におけるプログラム自動生成装置と、そ
の外部との関係を示す構成図である。プログラム自動生
成装置1は集計プログラム仕様書2、ならびにプログラ
ム実現上の制約3を入力とし、集計プログラム4を生成
する。ここで、集計プログラム仕様書、ならびにプログ
ラム実現上の制約は開発者が与える。(1) Overall Configuration of Device--FIG. 1 FIG. 1 is a configuration diagram showing the relationship between the automatic program generation device in this embodiment and the outside thereof. The automatic program generation device 1 receives the totalization program specification 2 and the constraint 3 for realizing the program and generates the totalization program 4. Here, the developer gives the total program specification and the restrictions for realizing the program.
【0022】(2)装置の動作・・・図2 図2は本実施例におけるプログラム自動生成装置により
生成された集計プログラムが動作する様子を説明する構
成図である。集計装置10において、集計プログラム4
は原データ受信装置が受信するデータを順次受け取る。
そして集計プログラム4は該データを調べ、集計すべき
項目を判断し、集計データ6に保存されている集計の値
のうち更新すべきものを更新する。また、集計プログラ
ム4は集計監視装置7を介してキーボード8から入力さ
れた集計結果報告の命令を受ける。このとき集計プログ
ラム4は集計データ6に保存されている集計結果をもと
に、予め用意された形式に集計結果をまとめ、集計監視
装置7を介して表示装置9に結果を出力する。また、集
計プログラム4は集計監視装置を介してキーボード8よ
り集計データクリアの命令を受ける。このとき集計プロ
グラム4は集計データ6に保存されている集計項目を全
てゼロクリアする。(2) Operation of the device ... FIG. 2 FIG. 2 is a block diagram for explaining how the counting program generated by the automatic program generation device in this embodiment operates. In the aggregation device 10, the aggregation program 4
Receives sequentially the data received by the original data receiving device.
Then, the totaling program 4 examines the data, determines the items to be totaled, and updates the totaling values stored in the totaling data 6 to be updated. Further, the totalization program 4 receives a totalization result report command input from the keyboard 8 via the totalization monitoring device 7. At this time, the tallying program 4 puts together the tallying results in a prepared format based on the tallying results stored in the tallying data 6, and outputs the results to the display device 9 via the tallying monitoring device 7. Further, the totalization program 4 receives a totalization data clear command from the keyboard 8 via the totalization monitoring device. At this time, the counting program 4 clears all the counting items stored in the counting data 6 to zero.
【0023】(3)装置の構成の詳細・・・図3 次に、プログラム自動生成装置1の構成並びに動作をや
や詳しく説明する。図3は図1に示したプログラム自動
生成装置1の内部を説明するブロック図である。このプ
ログラム自動生成装置1は、集計プログラムで取り扱う
データ項目と、集計プログラムが実行する複数の集計動
作について、その起動タイミング、動作条件並びに動作
内容を含む集計動作仕様とを記述したプログラム仕様書
2を入力し、このプログラム仕様書2として入力された
データ項目および各集計動作仕様を解析して集計プログ
ラム仕様内部表現102を得る仕様書解析部101を備
えている。また、前記仕様書解析部101で解析された
各集計動作仕様を、各々の起動タイミングに基づいて分
類し、起動タイミング別集計プログラム仕様104を得
る起動タイミング判定部103を有する。(3) Details of Device Configuration--FIG. 3 Next, the configuration and operation of the automatic program generation device 1 will be described in some detail. FIG. 3 is a block diagram for explaining the inside of the program automatic generation device 1 shown in FIG. The automatic program generation apparatus 1 includes a program specification 2 in which data items handled by a tally program and tally operation specifications including start timings, operation conditions and operation contents of a plurality of tally operations executed by the tally program are described. A specification analysis unit 101 is provided, which analyzes the data items input as the program specification 2 and each totaling operation specification to obtain the totaling program specification internal representation 102. Further, it has a start timing determination unit 103 that classifies each totaling operation specification analyzed by the specification analysis unit 101 based on each start timing and obtains a total program specification 104 for each start timing.
【0024】起動タイミング判定部103は、前記起動
タイミング別集計プログラム仕様104における各々の
起動タイミング毎にそれに対応する集計動作を調べ、集
計動作が複数個ある起動タイミングについてはどの順番
で動作条件の項目を判定するのが最適かを判定し、起動
タイミング毎にどの集計動作を行うか記述した集計プロ
グラム内部表現106を得る動作条件判定順位決定部1
05に接続されている。さらにこの動作条件判定順位決
定部105が、前記集計プログラム内部表現106を、
集計プログラム4として出力する集計プログラム出力部
107とを備えている。The activation timing determination unit 103 checks the aggregation operation corresponding to each activation timing in the aggregation program specification 104 for each activation timing, and in regard to the activation timing having a plurality of aggregation operations, the operation condition item in which order. The operation condition determination order determination unit 1 which determines whether it is optimal to determine and obtains the aggregation program internal representation 106 that describes which aggregation operation is performed at each activation timing.
05 is connected. Further, the operating condition determination rank determining unit 105 changes the aggregation program internal representation 106 to
A totaling program output unit 107 that outputs the totaling program 4 is provided.
【0025】また、集計プログラム実現上の制約3を入
力し、その内容を本装置が理解できる形式に解析するた
めの制約解析部110を備えている。本実施例では、集
計プログラムで使用するデータの宣言、メッセージ送信
の手続、メッセージ受信の手続などを、プログラム仕様
書に記述することなくプログラム実現上の制約として与
えるため、この制約解析部110で分析されたプログラ
ム実現上の各制約は、送受信メッセージ用手続ライブラ
リ111及び集計データ内領域作成ライブラリ112と
して蓄積され、集計プログラム内部表現106と共に集
計プログラム出力部107に与えられる。Further, there is provided a constraint analysis unit 110 for inputting the constraint 3 for realizing the totalization program and analyzing the content thereof in a format understandable by the present apparatus. In the present embodiment, since the declaration of data used in the aggregation program, the procedure of message transmission, the procedure of message reception, etc. are given as constraints for program realization without being described in the program specifications, the constraint analysis unit 110 analyzes them. Each constraint on the realized program is accumulated as a transmission / reception message procedure library 111 and a total data internal area creation library 112, and is given to the total program output unit 107 together with the total program internal representation 106.
【0026】(4)仕様書解析部101・・・図4 前記(3)で述べたように、本実施例のプログラム自動
生成装置1を構成する集計プログラム仕様書解折部10
1は、開発者が事象起動型の仕様記述言語によって作成
した集計プログラム仕様書2を読み込み、これと意味が
等しくしかも本装置が理解できるような集計プログラム
内部表現102を作成する。図4は、仕様記述言語によ
る集計プログラム仕様書2の記述例である。(4) Specification analysis unit 101 ... FIG. 4 As described in (3) above, the tabulation program specification folding unit 10 constituting the automatic program generation apparatus 1 of this embodiment.
In step 1, a developer reads a totalization program specification 2 created by an event-triggered specification description language, and creates a totalization program internal representation 102 that has the same meaning as this and can be understood by the present apparatus. FIG. 4 is a description example of the tabulation program specification 2 in the specification description language.
【0027】集計プログラム仕様書はここではリスト構
造を用いて書かれており、大きく ・受信メッセージ ・送信メッセージ ・内部で使用するデータ項目 ・集計動作 の4つの仕様が含まれている。各々の仕様はリストの最
初のアトムがキーワードr message,s me
ssage,data,whenであり、これによって
そのリストが何を指定しているかを識別する。The totaling program specification is written here using a list structure, and includes four main specifications: reception message, transmission message, data items used internally, and totaling operation. In each specification, the first atom in the list is the keyword r message, s me
message, data, when, which identifies what the list specifies.
【0028】受信メッセージは (r message 内部呼称 メッセージ受信手
段) という形式で書く。ここで、内部呼称は空白、改行を含
まない適当な文字列、メッセージ受信手段はプログラム
の手続き名である。メッセージ受信手段に該当するプロ
グラムの実体はプログラム実現上の制約3に記載する。
以後これと同じ名称が集計プログラム仕様書に現れた場
合には、これをメッセージ受信手段によって知ることの
できる、メッセージが到着した事象を意味するものと解
釈する。The received message is (r message internal name message receiving means). Here, the internal name is a blank, an appropriate character string that does not include a line feed, and the message receiving means is a procedure name of the program. The substance of the program corresponding to the message receiving means is described in Constraint 3 for realizing the program.
When the same name appears in the summary program specification after that, it means that the message has arrived and can be known by the message receiving means.
【0029】送信メッセージは (s message 内部呼称 メッセージ送信手
段) という形式で書く。ここで、内部呼称は空白、改行を含
まない適当な文字列、メッセージ送信手段はプログラム
の手続き名である。メッセージ送信手段に該当するプロ
グラムの実体はプログラム実現上の制約3に記載する。
以後これと同じ名称が集計プログラム仕様書に現れた場
合には、これをメッセージ送信手段によって達成され
る、メッセージ送信の命令を意味すると解釈する。The transmitted message is (s message internal name message sending means). Here, the internal name is a blank, an appropriate character string that does not include a line feed, and the message transmission means is a procedure name of the program. The substance of the program corresponding to the message transmitting means is described in Constraint 3 for implementing the program.
When the same name appears in the tabulation program specification thereafter, it is interpreted as meaning a message transmission command achieved by the message transmission means.
【0030】内部で使用するデータ項目は (data 内部呼称 サイズ データ形式) という形式で書く。ここで、内部呼称は空白、改行を含
まない適当な文字列、サイズは数字+byteまたは数
字+bitの何れか、データ形式はbinary,bc
d,time formの何れかを書く。この形式のデ
ータ項目の指定がある場合には、集計プログラム4は図
2の集計データ6にここで指定されたサイズの記述領域
を作成する。そしてその内部をデータ形式で指定された
形式で使用する。また、以後この内部呼称が集計プログ
ラム仕様書に現れた場合には、これを前記作成された記
述領域を意味すると解釈する。Data items used internally are written in the format (data internal name size data format). Here, the internal name is blank, an appropriate character string that does not include a line feed, the size is either number + byte or number + bit, and the data format is binary, bc.
d, time Write one of the forms. When a data item of this format is specified, the totaling program 4 creates a description area of the size specified here in the totaling data 6 of FIG. And the inside is used in the format specified by the data format. Further, when this internal name appears in the tabulation program specification after that, it is interpreted as meaning the created description area.
【0031】集計動作は (when 起動タイミング if 動作条件 then 動作内容) という形式で書く。ここで、when,if,then
は各々キーワードで、その後に起動タイミング、動作条
件、動作内容が続くことを意味している。ただし起動タ
イミングに対して常に動作内容に書かれた動作を行いた
い場合には、キーワードifと動作条件を省略する。起
動タイミングは受信メッセージの内部呼称を書く。動作
条件、ならびに動作内容の書き方は後述する。集計仕様
は起動タイミングに相当する受信メッセージを受けたと
き、動作条件を判定してその結果が真ならば、動作内容
に記載された全ての動作を記載通りの順番に行うことを
意味する。The totaling operation is written in a format of (where start timing if operating condition then operating content). Where, if, then
Indicates that each is a keyword, which is followed by activation timing, operation conditions, and operation contents. However, when it is desired to always perform the operation described in the operation content with respect to the activation timing, the keyword if and the operation condition are omitted. For the activation timing, write the internal name of the received message. The operation conditions and how to write the operation contents will be described later. The tabulation specification means that when the received message corresponding to the activation timing is received, the operation condition is judged, and if the result is true, all the operations described in the operation content are performed in the order described.
【0032】動作条件は (データ名 値)または(データ名 値1 値2) という形式の項目を1つまたは2つ以上並べて書く。こ
こで、データ名は内部で使用するデータ項目の内部呼称
を書く。また、値、値1、値2は全て10進数または1
6進数の数値または対応するデータ名のデータ形式がt
ime formの場合には時刻形式のデータ、たとえ
ば0:00や12:00などを書く。動作条件を評価す
ると、(データ名 値)の形式の動作条件はデータ名が
指すデータ項目の数値が等しいとき真、それ以外の場合
には偽となる。また、(データ名値1 値2)の形式の
動作条件はデータ名が指すデータ項目の数値が値1数値
以上、かつ値2の数値以下の場合には真、それ以外の場
合には偽となる。動作条件の項目が1つの時はその項目
が真の時、項目が2つ以上あった場合、全ての項目が真
の時、この動作条件は真となる。The operating condition is to write one or more items of the form (data name value) or (data name value 1 value 2) side by side. Here, the data name describes the internal name of the data item used internally. Also, value, value1, and value2 are all decimal numbers or 1
The hexadecimal number or the data format of the corresponding data name is t
ime In the case of form, time format data such as 0:00 or 12:00 is written. When the operating condition is evaluated, the operating condition of the form (data name value) is true when the numerical values of the data items pointed to by the data name are equal, and is false otherwise. In addition, the operation condition of the format (data name value 1 value 2) is true if the numerical value of the data item pointed to by the data name is greater than or equal to the numerical value of 1 and less than or equal to the numerical value of 2, and false otherwise. Become. When there is one item of operating condition, the item is true, and when there are two or more items, when all items are true, this operating condition is true.
【0033】動作内容は (データ名 操作)または(メッセージ) という形式の項目を一つまたは2つ以上並べて書く。こ
こでデータ名は内部で使用するデータ項目の内部呼称を
書く。また、メッセージは送信メッセージの内部呼称を
書く。As the operation content, one or more items of the form (data name operation) or (message) are arranged and written. Here, the data name describes the internal name of the data item used internally. The message also describes the internal designation of the outgoing message.
【0034】操作は +値,=値,(式) の中から選択する。値は10進数または16進数、また
は該動作内容のデータ名のデータ形式がtime fo
rmの場合には時刻形式の数値を書く。これらは各々デ
ータ名により参照される集計データ6の記憶領域に対し
て値で示される数値を加算する、値で示される数値を代
入する、式の演算結果を代入することを意味する。ま
た、(メッセージ)の形式の動作内容は、該当するメッ
セージを送信することを意味する。The operation is selected from + value, = value, and (expression). The value is decimal or hexadecimal, or the data format of the data name of the operation content is time. fo
In case of rm, write the time format numerical value. These mean adding a numerical value indicated by a value, substituting a numerical value indicated by a value, and substituting the operation result of an expression into the storage area of the aggregated data 6 referred to by each data name. Further, the operation content in the form of (message) means that the corresponding message is transmitted.
【0035】式は ・式+データ名または値 ・式−データ名または値 ・式*データ名または値 ・式/データ名または値 ・データ名または値 の中から選択して書く。データ名とは内部で使用するデ
ータ項目の内部呼称であり、値は10進数または16進
数、または動作内容のデータ名のデータ形式がtime
formの場合には時刻形式の数値を書く。各々演算
子の左側の式の計算結果とデータ名または値の評価結果
を加算、減算、乗算、除算すること、そしてデータ名ま
たは値の評価結果をそのまま式の計算結果とすることを
意味する。時刻形式のデータ形式に対して乗算、除算を
指定することはできない。The expression is selected from the following: expression + data name or value expression-data name or value expression * data name or value expression / data name or value data name or value. The data name is an internal name of a data item used internally, and its value is a decimal or hexadecimal number, or the data format of the data name of the operation content is time.
In case of form, write the time format numerical value. It means adding, subtracting, multiplying, and dividing the calculation result of the expression on the left side of each operator and the evaluation result of the data name or value, and using the evaluation result of the data name or value as the calculation result of the expression. You cannot specify multiplication or division for the time format data format.
【0036】受信メッセージ、ならびに送信メッセージ
を集計プログラム仕様書2へ記載せず、プログラム実現
上の制約3に記載する方式もあるが、こちらの方法によ
っても同じ集計プログラム4を導くことが可能である。
ただしこのような仕様とした場合、プログラム実現上の
制約解折部110では受信メッセージならびに送信メッ
セージの解折機能が必要である。また、解折の結果得ら
れる受信メッセージ、ならびに送信メッセージの内部表
現は起動タイミング判定部103の動作で必要となる。There is a method in which the reception message and the transmission message are not described in the totalization program specification 2 but are described in the constraint 3 for program realization, but the same totalization program 4 can be derived by this method. .
However, in the case of such a specification, the constraint solving unit 110 for implementing the program needs a function for solving received messages and transmitted messages. Moreover, the internal representation of the received message and the transmitted message obtained as a result of the solution is necessary for the operation of the activation timing determination unit 103.
【0037】 (5)起動タイミング判定部103・・・図5、図6 前記(4)で述べた仕様書解析部101で解析された集
計プログラム仕様内部表現102の、特に集計動作に関
する仕様に基づいて、起動タイミング別集計プログラム
仕様104が作られる。(5) Startup Timing Judgment Unit 103 ... FIG. 5, FIG. 6 Based on the specifications regarding the aggregation operation of the aggregation program specification internal representation 102 analyzed by the specification analysis unit 101 described in (4) above, particularly regarding the aggregation operation. Then, the summing program specification 104 for each start timing is created.
【0038】図5は起動タイミング別集計プログラム仕
様104のデータ構造の一例をブロック図を用いて説明
するものである。この起動タイミング別集計プログラム
仕様104は、集計プログラム仕様内部表現102の集
計動作に関する仕様を、起動タイミング毎にまとめ、さ
らに対応する受信メッセージの存在を確認したものであ
る。FIG. 5 is a block diagram for explaining an example of the data structure of the start-up timing-specific aggregate program specification 104. The start-up timing-specific aggregate program specification 104 is a summary of the specifications related to the aggregate operation of the aggregate program specification internal representation 102 for each startup timing, and the presence of a corresponding received message is confirmed.
【0039】図6は、図5のような起動タイミング別集
計プログラム仕様104を得るため起動タイミング判定
部103の動作をフローチャートにより示したものであ
る。以下、図6に従って起動タイミング判定部103の
動作を説明する。起動タイミング判定部103は、まず
集計プログラム仕様内部表現102の仕様を順番に一つ
ずつ取り出す(ステップ601)。そしてそれが集計動
作に関する仕様かそうでないかを判別し(ステップ60
2)、集計動作の仕様でないならば次の仕様を取り出
す。一方それが集計動作に関する仕様の場合には、その
起動タイミングを調べる(ステップ603)。それがま
だ起動タイミング判定部に登録されていないタイミング
ならば、これを登録する(ステップ604)。そして、
何れの場合もその集計動作に関する仕様を登録した起動
タイミングに関連して登録する(ステップ605)。全
ての仕様を調べ終わったとき、次に起動タイミング判定
部に登録された起動タイミングが対応する受信メッセー
ジに関する仕様を持っているかを調べる。まず、登録さ
れた起一つずつ取り出す(ステップ606)。そしてそ
の起動タイミングに対応する内部呼称を持つ、受信メッ
セージの仕様があるかどうかを調べる。ここで、もし対
応する受信メッセージの仕様がないならば、エラーメッ
セージを出力して(ステップ607)、処理を停止す
る。全ての登録された起動タイミングに対応する受信メ
ッセージの仕様が存在することがわかったら、起動タイ
ミング判定部103は正常に終了する(ステップ60
8) (6)動作条件判定順位決定部105・・・図7、図8
〜10図 前記(5)の起動タイミング判定部103で得られた起
動タイミング別集計プログラム仕様104には、図5の
ように各起動タイミング毎に種々の動作内容とそれを実
施するための条件が分類して記述されている。動作条件
判定順位決定部105は、起動タイミング判定部103
で判定された各タイミング毎に、そのタイミングにおい
て行われる動作内容とその動作内容を実行するための条
件とを分析して、これを集計プログラムに変換できる形
式で記述した集計プログラム内部表現106を得るもの
である。特に、本実施例において、この動作条件判定順
位決定部105は、どのような条件のもとでどのような
動作内容を行なう必要があるかを、最小の条件判定操作
により判定できるよう考慮したものとなっている。FIG. 6 is a flow chart showing the operation of the start timing determination unit 103 to obtain the start timing summary program specification 104 as shown in FIG. The operation of the activation timing determination unit 103 will be described below with reference to FIG. The activation timing determination unit 103 first fetches the specifications of the aggregation program specification internal representation 102 one by one (step 601). Then, it is determined whether the specification is related to the aggregation operation or not (step 60
2) If the specification is not for totaling operation, the following specification is taken out. On the other hand, if it is a specification related to the tabulation operation, the activation timing is checked (step 603). If the timing is not yet registered in the activation timing determination unit, it is registered (step 604). And
In any case, the specification relating to the totaling operation is registered in relation to the registered activation timing (step 605). When all the specifications have been checked, it is then checked whether the startup timing registered in the startup timing determination unit has the specifications for the corresponding received message. First, the registered origins are taken out one by one (step 606). Then, it is checked whether there is a specification of a received message having an internal name corresponding to the activation timing. If there is no corresponding received message specification, an error message is output (step 607) and the processing is stopped. When it is found that there are specifications of the received message corresponding to all registered activation timings, the activation timing determination unit 103 ends normally (step 60).
8) (6) Operating condition determination ranking determination unit 105 ... FIGS. 7 and 8
10 to 10 In the aggregation program specification 104 for each start timing obtained by the start timing determination unit 103 in (5) above, various operation contents and conditions for executing the operation are provided for each start timing as shown in FIG. It is classified and described. The operating condition determination order determination unit 105 includes a startup timing determination unit 103.
For each timing determined in step 1, the operation content performed at that timing and the conditions for executing the operation content are analyzed, and the totalization program internal representation 106 described in a format that can be converted into the totalization program is obtained. It is a thing. In particular, in the present embodiment, the operation condition determination order determination unit 105 considers under what kind of conditions and what kind of operation contents should be performed by the minimum condition determination operation. Has become.
【0040】図7は、動作条件判定順位決定部105に
よって得られる集計プログラム内部表現106のデータ
構造の一例をブロック図を用いて説明するものである。
この集計プログラム内部表現106は、データ到着のメ
ッセージを受信した時、最初に入出場フラグが0かどう
かを調べ、その結果が真であるか偽であるかによって次
の条件判定操作を変えている。この順番にデータを判定
することによりどのような到着メッセージに対しても2
回の条件判定操作で集計すべき動作内容を割り出すこと
が可能である。FIG. 7 illustrates an example of the data structure of the aggregation program internal representation 106 obtained by the operation condition determination rank determining unit 105 with reference to a block diagram.
When the data arrival message is received, the totaling program internal representation 106 first checks whether the entry / exit flag is 0, and changes the next condition determination operation depending on whether the result is true or false. . By determining the data in this order, 2
It is possible to determine the operation content to be totaled by performing the condition determination operation once.
【0041】図8〜10図は、前記のような動作条件判
定順位決定部105の動作をフローチャートを用いて説
明するものである。以下、図8〜10図にしたがって動
作条件判定順位決定部105の動作を説明する。FIGS. 8 to 10 are for explaining the operation of the above-mentioned operation condition judging order determining section 105 by using a flow chart. Hereinafter, the operation of the operation condition determination order determination unit 105 will be described with reference to FIGS.
【0042】まず、図8に示すように、動作条件判定順
位決定部105は起動タイミング別集計プログラム仕様
104から1つずつ順に起動タイミングを取り出す(ス
テップ801)。この起動タイミングにはそのタイミン
グで起動する集計動作が付属している。次に、この付属
している集計動作を全て取り出し(ステップ802)、
これを引数として処理部Aを呼び出す(ステップ80
3)。この処理部Aは与えられた集計動作に対して動作
の必要/不要を判定する最適の判断プログラム、ならび
にそれらの動作内容に相当するプログラムのブロックを
戻す。このプログラムのブロックを該起動タイミングに
結合して(ステップ804)、該起動タイミングにおい
て条行するべきプログラムの内部表現が作られる。全て
の起動タイミングに対して実行するべきプログラムの内
部表現を作り、集計プログラム内部表現106とする。First, as shown in FIG. 8, the operating condition determination ranking determination unit 105 sequentially extracts the activation timings one by one from the aggregation program specifications 104 for each activation timing (step 801). This start timing is accompanied by a counting operation that starts at that timing. Next, all of the attached counting operations are extracted (step 802),
The processing unit A is called with this as an argument (step 80).
3). This processing unit A returns the optimum judgment program for judging the necessity / unnecessity of the operation for the given totalizing operation, and the blocks of the program corresponding to the contents of those operations. The blocks of this program are combined with the activation timing (step 804) to create an internal representation of the program to be executed at the activation timing. An internal representation of a program to be executed for all start timings is created and is used as the totalization program internal representation 106.
【0043】次に、処理部Aで行われる処理を図9およ
び図10により説明する。処理部Aは1つまたは複数の
集計動作の、if動作条件ならびにthen動作内容に
相当する記述を引数として受け取る。そして該集計動作
の実行すべき動作内容を判断し、それを実行するプログ
ラムを戻すものである。Next, the processing performed by the processing section A will be described with reference to FIGS. 9 and 10. The processing unit A receives, as an argument, a description corresponding to if operation conditions and then operation contents of one or a plurality of totaling operations. Then, the operation content to be executed in the totaling operation is judged, and the program for executing the operation is returned.
【0044】まず、図9に示すように、処理部Aは集計
動作が1つか複数かを判断する(ステップ805)。集
計動作が一つの場合は、どの動作条件の項目から評価し
ても同じなので動作条件と動作内容とをそのまま戻す
(ステップ823)。次に、集計動作が複数個ある場
合、どの動作条件の項目を最初に判定するのが最適かを
考える。まず、該当する集計動作に含まれる全ての動作
条件の項目をリストアップし、重複を取り除く(ステッ
プ806)。その後、動作条件の項目を一つずつ選び出
し(ステップ807)、その項目を判断すると対象が絞
れる集計動作の数、すなわち動作条件にその項目が含ま
れる集計動作、ならびに動作条件にその項目とちょうど
論理否定の関係にある項目が含まれる集計動作の数を数
える(ステップ808)。そしてその個数が最大の動作
条件の項目を選び出す(ステップ809,810)。First, as shown in FIG. 9, the processing unit A determines whether the totalizing operation is one or more (step 805). When there is only one totaling operation, the operation condition and the operation content are returned as they are because they are the same regardless of which operation condition item is evaluated (step 823). Next, when there are a plurality of tabulation operations, it is considered which operation condition item is best to judge first. First, items of all operating conditions included in the corresponding totalizing operation are listed up and duplicates are removed (step 806). After that, the items of the operation condition are selected one by one (step 807), and when the item is judged, the number of totalizing operations targeted is narrowed down, that is, the totaling operation in which the item is included in the operating condition, and the operating condition is exactly the same as the item. The number of totaling operations including items having a negative relationship is counted (step 808). Then, the item of the operating condition having the largest number is selected (steps 809 and 810).
【0045】このようにして選び出した動作条件の項目
の判定に対しては、その結果が真の時実行し得る集計動
作、結果が偽の時実行し得る集計動作、その項目に関係
なく実行し得る集計動作の3種類の集計動作が一般に存
在する。そこで、これらに対応するプログラムを各々
B、C、Dと名付け、次にこれを求める。すなわち、図
10に示すように、動作条件に該動作条件の項目を含む
集計動作をもとの集計動作からリストアップし (ステ
ップ811)、これらの動作条件下ら該動作条件の項目
を除去し(ステップ812)、得られた仕様を引数とし
て処理部Aを再帰的に呼び出す(ステップ813)。そ
の実行結果はBである(ステップ814)。As for the determination of the item of the operation condition selected in this way, the totalizing operation that can be executed when the result is true, the totalizing operation that can be executed when the result is false, and the execution regardless of the item. There are generally three types of tallying operations to obtain. Therefore, the programs corresponding to these are named B, C, and D, and then they are obtained. That is, as shown in FIG. 10, the totaling operation including the operating condition item in the operating condition is listed from the original totaling operation (step 811), and the operating condition item is removed from these operating conditions. (Step 812) Then, the processing unit A is recursively called with the obtained specification as an argument (step 813). The execution result is B (step 814).
【0046】同様に、動作条件に該動作条件の項目とち
ょうど論理否定の関係にある項目を含む集計動作をリス
トアップし(ステップ815)、該動作条件の項目を除
去し(ステップ816)、得られた仕様を引数として処
理部Aを再帰的に呼び出す(ステップ817)。その実
行結果はCである(ステップ818)。さらに、動作条
件に該動作条件の項目、それとちょうど論理否定の関係
にある項目の何れも含まない集計動作をリストアップし
(ステップ819)、これを引数として処理部Aを再帰
的に起動する(ステップ820)。その実行結果はDで
ある(ステップ821)。最後にこれらをプログラムの
形式に結合して(ステップ822)、プログラムの内部
表現を得る。Similarly, a totaling operation including an item having a logical negation relationship with the item of the operating condition in the operating condition is listed (step 815), the item of the operating condition is removed (step 816), and the obtained value is obtained. The processing unit A is recursively called with the specified specifications as an argument (step 817). The execution result is C (step 818). Further, the operation condition is listed as a totaling operation that does not include the item of the operation condition or the item having the logical negation relationship with it (step 819), and the processing unit A is recursively activated with this as an argument ( Step 820). The execution result is D (step 821). Finally, they are combined into the form of the program (step 822) to obtain the internal representation of the program.
【0047】(7)プログラム実現上の制約・・・図3 前記(6)のようにして得られた集計プログラム内部表
現106に基づき、これと等価な集計プログラム4を生
成する。ただし、本実施例では、集計プログラム内部表
現106はプログラム仕様書に記述された集計動作仕様
に基づいて生成されているので、プログラムで使用する
データの宣言、メッセージ送信の手続き、メッセージ受
信の手続きが含まれていない。そこで、使用するデータ
の宣言は、集計プログラム仕様内部表現103の内部で
使用するデータ項目に基づき、集計データ内領域作成ラ
イブラリ112から必要な手続きを抜き出すことで作成
する。メッセージ送信の手続きは、集計プログラム内部
表現で使用されている送信メッセージの名称をもとに集
計プログラム仕様内部表現102の送信メッセージを参
照して手続き名を求め、送受信メッセージ用手続きライ
ブラリ111から必要な手続きを抜き出すことにより作
成する。メッセージ受信の手続きは、集計プログラム内
部表現で使用されている受信メッセージの名称をもとに
集計プログラム仕様内部表現102の受信メッセージを
参照して手続き名を求め、送受信メッセージ用手続きラ
イブラリ111から必要な手続きを抜き出すことにより
作成する。(7) Restriction on program realization ... FIG. 3 Based on the internal representation 106 of the totalizing program obtained as described in (6) above, an equivalent totalizing program 4 is generated. However, in this embodiment, since the aggregation program internal representation 106 is generated based on the aggregation operation specification described in the program specification, the data declaration used in the program, the message transmission procedure, and the message reception procedure are Not included. Therefore, the declaration of the data to be used is created by extracting the necessary procedure from the aggregated data internal area creation library 112 based on the data items used inside the aggregated program specification internal representation 103. The message transmission procedure is required from the transmission / reception message procedure library 111 by referring to the transmission message of the aggregation program specification internal representation 102 to obtain the procedure name based on the name of the transmission message used in the aggregation program internal representation. Create by extracting procedures. The message receiving procedure is required from the procedure library 111 for sending and receiving messages by obtaining the procedure name by referring to the received message in the tabulation program specification internal representation 102 based on the name of the received message used in the tabulation program internal representation. Create by extracting procedures.
【0048】(8)実施例の効果 以上の通り、本実施例のプログラム生成装置は、プログ
ラム仕様書に記述された複数の集計動作仕様を起動タイ
ミング毎に分類して起動タイミング別集計プログラム仕
様を得てから、各々の起動タイミング毎に条件とそれに
対応する処理を解析して実行すべきプログラムを生成す
るようにしたものである。従って、本実施例によれば、
動作内容とそれを実施するための種々の条件を備え、し
かも同じ条件であってもタイミングが異なる場合には動
作内容の実行の可否が変化するような複雑なプログラム
であっても、タイミング、動作条件及び動作内容をプロ
グラム仕様書に記述するだけで、これらの仕様のすべて
を考慮した集計プログラムを自動的に生成することがで
きる。しかも、本実施例ではタイミング起動判定部10
3によって各動作仕様をタイミング別に分類するので、
動作仕様中の他の項目、すなわち動作条件およびそれに
対応する動作内容については、従来公知の事象起動型の
仕様記述言語を利用することでプログラム仕様書を簡単
に実行可能なプログラム化することができる。(8) Effects of the Embodiment As described above, the program generating apparatus according to the present embodiment classifies a plurality of totaling operation specifications described in the program specifications for each start timing to generate the totalizing program specifications for each start timing. After the acquisition, the condition and the processing corresponding thereto are analyzed at each start timing to generate a program to be executed. Therefore, according to this embodiment,
Even if it is a complicated program that has operation contents and various conditions for executing them, and even if the timing is different even under the same conditions, the timing and operation of a complicated program By simply describing the conditions and operation contents in the program specifications, it is possible to automatically generate an aggregation program in consideration of all of these specifications. Moreover, in this embodiment, the timing activation determination unit 10
Since each operation specification is classified by timing according to 3,
For other items in the operation specification, that is, the operation condition and the operation content corresponding thereto, the program specification can be easily executed into a program by using a conventionally known event-triggered specification description language. .
【0049】特に、本実施例は、複数の集計動作仕様を
単に起動タイミング別に分類するだけでなく、動作条件
判定順位決定部105によって、同じタイミングについ
て動作内容が複数個ある場合に、その動作内容に対応す
る動作条件を最少の条件判定操作により判定できるよう
にしたので、記述される集計プログラム内部表現106
が単純化されたものになり、それをもとにした集計プロ
グラム4の生成が簡単に行える。また、得られた集計プ
ログラム4も簡単な構造で、実行速度も早い利点があ
る。In particular, the present embodiment not only classifies a plurality of tabulation operation specifications according to start timings, but also when the operation condition determination order determination unit 105 has a plurality of operation contents at the same timing, the operation contents Since the operation condition corresponding to can be judged by the minimum condition judgment operation, the totaling program internal representation 106 described
Is simplified, and the aggregation program 4 based on it can be easily generated. Also, the obtained totalizing program 4 has a simple structure and has an advantage of high execution speed.
【0050】また、本実施例は、データ項目や動作仕様
を記述する際にキーワードを用いているので、データ項
目や各動作仕様の識別がきわめて容易に実施でき、起動
タイミング判定部による起動タイミング別集計プログラ
ム仕様の作成や動作条件判定順位決定部におけるどの動
作条件から判定していくかの決定が容易になる。Further, in this embodiment, since the keyword is used when describing the data item and the operation specification, the data item and each operation specification can be identified very easily, and the start timing judging section can classify the start timings. It becomes easy to create a totaling program specification and to determine from which operating condition the operating condition determination order determination unit determines.
【0051】(9)他の実施例 図示の実施例は、動作条件判定順位決定部105によっ
て、一つのタイミングに複数の動作内容がある場合に、
どの動作条件に当てはまる動作内容を最初に判定するの
が最適かということを判定したが、一つのタイミングが
有する動作内容が少なくほとんどのタイミングが一つの
動作条件と動作内容しか持たない場合や、集計プログラ
ムの実行速度や複雑化などについて特に制限がない場合
には、起動タイミング判定部103によって得られた集
計プログラム仕様104にしたがって集計プログラム4
を生成することもできる。(9) Other Embodiments In the illustrated embodiment, when the operation condition determination order determination unit 105 has a plurality of operation contents at one timing,
We have determined that it is best to first determine which operation condition applies to which operation condition. However, if one timing has few operation contents and most timings have only one operation condition and operation content, or If there is no particular limitation on the program execution speed or complication, the totalization program 4 according to the totalization program specification 104 obtained by the start timing determination unit 103.
Can also be generated.
【0052】図示の実施例は、データ項目及び各動作仕
様をキーワードとそれに対応する内容とによって記述し
たが、記述の内容からデータ項目、各動作仕様を識別す
ることができるならば必ずしもキーワードを使用する必
要はない。In the illustrated embodiment, the data item and each operation specification are described by the keyword and the content corresponding to the keyword. However, if the data item and each operation specification can be identified from the description content, the keyword is not always used. do not have to.
【0053】図示の実施例は、集計プログラムの中で
も、集計動作に関する仕様を中心として説明したが、当
然のことながら現実の集計プログラムには集計動作以外
の動作に関する仕様も要求されることが多い。このよう
な一般的な動作仕様については、前記のような集計動作
に関する仕様と同様な手法により自動的にプログラムを
生成することも可能であるが、このような一般的な動作
に関する仕様は、動作タイミングを要求されないなどの
理由で集計プログラムに比較して単純なものが多い。従
って、集計プログラムのこのような部分については、本
実施例の図3に示したようにプログラム実現上の制約と
して記述したり、従来公知の事象起動型のプログラム言
語を使用して直接プログラムを記述したり、あるいは項
書き換えなどの手法を組み合わせて使用することも可能
である。Although the illustrated embodiment has been described focusing on the specifications relating to the totalizing operation in the totalizing program, it goes without saying that the actual totaling program often requires specifications relating to operations other than the totalizing operation. With respect to such general operation specifications, it is possible to automatically generate a program by the same method as the above-mentioned specification regarding the total operation. In many cases, it is simpler than the aggregation program because the timing is not required. Therefore, such a part of the totalization program is described as a constraint for program realization as shown in FIG. 3 of the present embodiment, or the program is directly described by using a conventionally known event-triggered programming language. It is also possible to combine or use methods such as term rewriting.
【0054】[0054]
【発明の効果】以上説明したように、本発明によれば、
開発者は集計プログラムの仕様を定められた形式の仕様
記述言語により正確に記述し、また、予め用意しておい
たプログラム実現上の制約を組み合わせてプログラム自
動生成装置を動作させるだけで、集計プログラム仕様書
を正確に反映した集計プログラムを迅速に得ることがで
きる。その結果、開発者自身が開発することによりしば
しば発生する誤りを押さえることができ、また、プログ
ラムの開発時間を短縮することが可能となる。As described above, according to the present invention,
The developer can accurately describe the specifications of the totaling program in the specified format specification language, and by simply operating the automatic program generation device by combining the restrictions for realizing the program prepared in advance, the totaling program It is possible to quickly obtain an aggregation program that accurately reflects the specifications. As a result, it is possible to suppress errors that often occur due to the developer's own development, and it is possible to shorten the program development time.
【図1】本発明の集計プログラム自動生成装置の構成を
概略的に示す構成図。FIG. 1 is a configuration diagram schematically showing the configuration of an aggregate program automatic generation device of the present invention.
【図2】本発明の集計プログラム自動生成装置によって
得られた集計プログラムの使用状態を示す構成図。FIG. 2 is a configuration diagram showing a usage state of a tallying program obtained by the tallying program automatic generation device of the present invention.
【図3】本発明の集計プログラム自動生成装置の構成を
より詳細に示すブロック図。FIG. 3 is a block diagram showing the configuration of the totalization program automatic generation device of the present invention in more detail.
【図4】本発明の集計プログラム自動生成装置に入力す
る集計プログラム仕様書の記述例を示す図。FIG. 4 is a diagram showing a description example of a totalization program specification that is input to the totalization program automatic generation device of the present invention.
【図5】本発明の集計プログラム自動生成装置によって
得られる起動タイミング別集計プログラムの構造の例を
示す図。FIG. 5 is a diagram showing an example of the structure of a start-up timing-based totalization program obtained by the totalization program automatic generation device of the present invention.
【図6】本発明の集計プログラム自動生成装置を構成す
る起動タイミング判定部の動作例を示すフローチャー
ト。FIG. 6 is a flowchart showing an operation example of a start timing determination unit that constitutes the totalization program automatic generation device of the present invention.
【図7】本発明の集計プログラム自動生成装置によって
得られる集計プログラム内部表現の構造の例を示す図。FIG. 7 is a diagram showing an example of the structure of an internal representation of an aggregate program obtained by the aggregate program automatic generation device of the present invention.
【図8】本発明の集計プログラム自動生成装置を構成す
る動作条件判定順位決定部の動作を示すフローチャー
ト。FIG. 8 is a flowchart showing the operation of an operation condition determination order determination unit that constitutes the totalization program automatic generation device of the present invention.
【図9】本発明の集計プログラム自動生成装置を構成す
る動作条件判定順位決定部の動作を示すフローチャート
であって、図8のフローチャートにおけるステップ80
3部分の詳細を示す図。9 is a flowchart showing the operation of an operation condition determination order determination unit that constitutes the totalization program automatic generation device of the present invention, and is step 80 in the flowchart of FIG.
The figure which shows the detail of 3 parts.
【図10】本発明の集計プログラム自動生成装置を構成
する動作条件判定順位決定部の動作をしめすフローチャ
ートであって、図9のフローチャートにおける*印部分
に連なる図。10 is a flow chart showing the operation of an operation condition determination order determination unit that constitutes the totalization program automatic generation device of the present invention, and is a diagram continued to the part marked with * in the flow chart of FIG.
1…プログラム自動生成装置 2…集計プログラム仕様書 3…プログラム実現上の制約 4…集計プログラム 101…仕様書解析部 102…集計プログラム仕様内部表現 103…起動タイミング判定部 104…起動タイミング別集計プログラム仕様 105…動作条件判定順位決定部 106…集計プログラム内部表現 107…集計プログラム出力部 110…制約解析部 111…送受信メッセージ手続ライブラリ 112…集計データ内領域作成ライブラリ DESCRIPTION OF SYMBOLS 1 ... Automatic program generation device 2 ... Aggregation program specification 3 ... Restriction on program implementation 4 ... Aggregation program 101 ... Specification analysis unit 102 ... Aggregation program specification internal representation 103 ... Activation timing determination unit 104 ... Aggregation program specification by activation timing 105 ... Operating condition determination order determination unit 106 ... Aggregation program internal representation 107 ... Aggregation program output unit 110 ... Constraint analysis unit 111 ... Send / receive message procedure library 112 ... Aggregation data internal area creation library
Claims (4)
集計プログラムが実行する複数の集計動作について、そ
の起動タイミング、動作条件並びに動作内容を含む集計
動作仕様とを記述したプログラム仕様書を入力し、入力
されたプログラム仕様書からデータ項目および各集計動
作仕様を解析する仕様書解析部と、 前記仕様書解析部で解析された各集計動作仕様を、各々
の起動タイミングに基づいて分類し、起動タイミング別
集計プログラム仕様を得る起動タイミング判定部と、 この起動タイミング別の集計プログラム仕様を実行可能
な集計プログラムとして出力する集計プログラム出力部
とを備えていることを特徴とする集計プログラム自動生
成装置。1. Data items handled by an aggregation program,
Enter the program specifications that describe the start timing, operation conditions, and aggregate operation specifications including the operation contents for multiple aggregate operations executed by the aggregate program, and enter the data items and each aggregate operation specification from the input program specifications. And a start timing determination unit that classifies the totaling operation specifications analyzed by the specification analyzing unit based on their respective start timings to obtain the total program specifications for each start timing, and the start An aggregate program automatic generation device comprising: an aggregate program output unit that outputs an aggregate program specification for each timing as an executable aggregate program.
集計プログラムが実行する複数の集計動作について、そ
の起動タイミング、動作条件並びに動作内容を含む集計
動作仕様とを記述したプログラム仕様書を入力し、入力
されたプログラム仕様書からデータ項目および各集計動
作仕様を解析して集計プログラム仕様内部表現を得る仕
様書解析部と、 前記仕様書解析部で解析された各集計プログラム仕様内
部表現を、各々の起動タイミングに基づいて分類し、起
動タイミング別集計プログラム仕様を得る起動タイミン
グ判定部と、 前記起動タイミング別集計プログラム仕様における各々
の起動タイミング毎にそれに対応する集計動作を調べ、
集計動作が複数個ある起動タイミングについてはどの順
番で動作条件の項目を判定するのが最適かを判定し、各
起動タイミング毎にどのような条件のもとでどの集計動
作を行うか記述した集計プログラム内部表現を得る動作
条件判定順位決定部と、 前記集計プログラム内部表現を、実行可能な集計プログ
ラムとして出力する集計プログラム出力部とを備えてい
ることを特徴とする集計プログラム自動生成装置。2. A data item handled by a counting program,
Enter the program specifications that describe the start timing, operation conditions, and aggregate operation specifications including the operation contents for multiple aggregate operations executed by the aggregate program, and enter the data items and each aggregate operation specification from the input program specifications. And a specification analysis unit that obtains an internal representation of the aggregation program specification by analyzing each of the aggregation program specification internal representations analyzed by the specification analysis unit based on each activation timing, and aggregation program specifications by activation timing And a start timing determination unit that obtains
For startup timings with multiple aggregation operations, it is determined in what order it is best to determine the items of the operation conditions, and the aggregation that describes under which conditions each aggregation operation is performed An automatic totalization program generation device comprising: an operating condition determination order determination unit that obtains a program internal expression; and a totalization program output unit that outputs the totalization program internal expression as an executable totalization program.
する制約解析部と、この制約解析部によって解析された
制約を実行可能な集計プログラムとして出力する集計プ
ログラム出力部とを備えていることを特徴とする請求項
1または請求項2の集計プログラム自動生成装置。3. A constraint analysis section for analyzing the constraints on the input program realization, and a totalization program output section for outputting the constraints analyzed by the constraint analysis section as an executable totalization program. 3. The totalization program automatic generation device according to claim 1 or 2.
動タイミング、動作条件並びに動作内容が、キーワード
とそれに対応する記述とから構成されている請求項1、
請求項2または請求項3の集計プログラム自動生成装
置。4. A data item and an activation timing, an operation condition and an operation content included in each operation specification are composed of a keyword and a description corresponding to the keyword.
An aggregate program automatic generation device according to claim 2 or claim 3.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP22929793A JPH0784773A (en) | 1993-09-14 | 1993-09-14 | Automatic totalization program generator |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP22929793A JPH0784773A (en) | 1993-09-14 | 1993-09-14 | Automatic totalization program generator |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0784773A true JPH0784773A (en) | 1995-03-31 |
Family
ID=16889933
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP22929793A Pending JPH0784773A (en) | 1993-09-14 | 1993-09-14 | Automatic totalization program generator |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0784773A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005100198A (en) * | 2003-09-26 | 2005-04-14 | Canon Software Inc | PROGRAM GENERATION DEVICE, PROGRAM GENERATION METHOD, PROGRAM, AND RECORDING MEDIUM |
| US9919606B2 (en) | 2013-05-20 | 2018-03-20 | Sevcon Limited | Vehicle controller and method of controlling a vehicle |
-
1993
- 1993-09-14 JP JP22929793A patent/JPH0784773A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005100198A (en) * | 2003-09-26 | 2005-04-14 | Canon Software Inc | PROGRAM GENERATION DEVICE, PROGRAM GENERATION METHOD, PROGRAM, AND RECORDING MEDIUM |
| US9919606B2 (en) | 2013-05-20 | 2018-03-20 | Sevcon Limited | Vehicle controller and method of controlling a vehicle |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Bunte et al. | The mCRL2 toolset for analysing concurrent systems: improvements in expressivity and usability | |
| EP3631618B1 (en) | Automated dependency analyzer for heterogeneously programmed data processing system | |
| US6408430B2 (en) | Interactive software testing system and method | |
| CN107644323B (en) | Intelligent auditing system for business flow | |
| Alur et al. | An analyzer for message sequence charts | |
| Wermelinger | Specification of software architecture reconfiguration | |
| CN119690854B (en) | Large model-assisted program function automatic perception fuzz testing method and system | |
| Bernardo et al. | AEMPA: A process algebraic description language for the performance analysis of software architectures | |
| CN114924721A (en) | Code generation method and device, computer equipment and storage medium | |
| CN113221126A (en) | TensorFlow program vulnerability detection method and device and electronic equipment | |
| US5884081A (en) | Method and system for synchronizing code with design | |
| Hauschildt et al. | WOFLAN: a Petri-net-based Workflow Analyzer | |
| US5812145A (en) | Message sequence chart analyzer | |
| Feo-Arenis et al. | On implementable timed automata | |
| US20080244380A1 (en) | Method and device for evaluating an expression on elements of a structured document | |
| WO2025195667A1 (en) | Source code migration, maintenance, refactoring using domain concepts for telecommunications network services | |
| Gallardo et al. | A framework for automatic construction of abstract promela models | |
| EP4629184A1 (en) | Method and apparatus for compiling sorting operator | |
| Jakobsen et al. | Fast symbolic computation of bottom SCCs | |
| CN120104189A (en) | Instruction generation method, electronic device and storage medium | |
| JP7391740B2 (en) | Impact identification support device and impact identification support method | |
| US5628012A (en) | Method and apparatus for querying a database containing disjunctive information | |
| Ruys et al. | First passage time analysis of stochastic process algebra using partial orders | |
| CN121092755B (en) | A Multi-Agent Collaborative Graph Database Natural Language Interaction Method and System | |
| JPH0689177A (en) | Method and system for rewinding state of expert system |