JPH06230949A - Automatic program generating device - Google Patents
Automatic program generating deviceInfo
- Publication number
- JPH06230949A JPH06230949A JP1525593A JP1525593A JPH06230949A JP H06230949 A JPH06230949 A JP H06230949A JP 1525593 A JP1525593 A JP 1525593A JP 1525593 A JP1525593 A JP 1525593A JP H06230949 A JPH06230949 A JP H06230949A
- Authority
- JP
- Japan
- Prior art keywords
- unit
- specifications
- correlation
- source code
- program
- 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
- 230000007704 transition Effects 0.000 claims abstract description 47
- 230000008859 change Effects 0.000 abstract description 7
- 238000003860 storage Methods 0.000 description 17
- 230000009471 action Effects 0.000 description 14
- 238000002360 preparation method Methods 0.000 description 9
- 230000014509 gene expression Effects 0.000 description 8
- 230000006870 function Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000006872 improvement Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007562 laser obscuration time method Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000000034 method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
Landscapes
- Stored Programmes (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、状態遷移モデルによっ
て表されたソフトウェアの仕様に基づいて、前記ソフト
ウェアのプログラムを生成するプログラム自動生成装置
の改良に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an improvement of a program automatic generation device for generating a software program based on the software specifications represented by a state transition model.
【0002】[0002]
【従来の技術】ハードウェアやソフトウェアなどのシス
テムを制御するソフトウェアは、一般に、制御ソフトウ
ェアと呼ばれる。このうち、ハードウェアを制御する制
御ソフトウェアの例としては、現金自動預払機(キャッ
シュ・ディスペンサ)や工作機械の制御プログラムが考
えられる。また、ソフトウェア自体を制御する制御ソフ
トウェアの例としては、いわゆるオペレーティング・シ
ステム(OS)が考えられる。2. Description of the Related Art Software for controlling a system such as hardware and software is generally called control software. Among these, examples of control software for controlling hardware include a control program for an automatic teller machine (cash dispenser) and a machine tool. A so-called operating system (OS) can be considered as an example of control software that controls the software itself.
【0003】このような制御ソフトウェアの開発に適す
る装置として、従来から、ソフトウェアの状態遷移モデ
ル仕様に基づいて、プログラムを生成するプログラム自
動生成装置が知られている。ここで、状態遷移モデルと
は、ソフトウェアの仕様を表現するためのモデル形式の
一つであって、ソフトウェアや制御対象システムを、複
数の「状態」に遷移する存在として把握し、ソフトウェ
アの仕様を、前記状態間の遷移によって表現するもので
ある。また、状態遷移モデル仕様とは、このような状態
遷移モデルによって記述されたソフトウェアの仕様であ
る。As an apparatus suitable for developing such control software, an automatic program generating apparatus for generating a program based on a software state transition model specification has been known. Here, the state transition model is one of the model formats for expressing the specifications of software, and grasps the software or controlled system as an entity that transits to multiple “states” and , Is expressed by a transition between the states. Further, the state transition model specification is a specification of software described by such a state transition model.
【0004】この状態遷移モデルは、原則的には、制御
ソフトウェアのみならず、データベース・ソフトウェア
のように具体的目的のための単なるアプリケーション・
ソフトウェアの表現に用いることもできる。しかし、状
態遷移モデルは、特に、ハードウェアを制御する制御ソ
フトウェアの仕様表現に適している。すなわち、状態遷
移モデルは、ソフトウェアやその制御対象システムを、
その「状態」と、状態間の「遷移」と、この遷移を生じ
させる「イベント」と、遷移の際に生じる「アクショ
ン」とによって表現するものである。これを換言すれ
ば、状態遷移モデルはソフトウェアやその制御対象シス
テムを、過去の入力によって形成された「状態」におい
て、現在の新たな入力(イベント)を受付けて遷移し、
遷移の際に前記「状態」におけるイベントに応じた出力
(アクション)を行うものとして表現することを意味す
る。これに対して、ハードウェアの制御ソフトウェア
は、センサやスイッチからの過去の入力によって形成さ
れたハードウェアの「状態」において、新たな現在の
「入力」を受付け、前記状態における現在の入力に応じ
たハードウェア制御命令を発するものである。以上のよ
うに状態遷移モデルは、本来的に、制御ソフトウェアと
共通の構成を有しているため、制御ソフトウェアの記述
に適している。In principle, this state transition model is used not only for control software but also for database applications such as application software for specific purposes.
It can also be used to represent software. However, the state transition model is particularly suitable for specification representation of control software that controls hardware. That is, the state transition model describes software and its controlled system as
It is expressed by the "state", the "transition" between the states, the "event" that causes this transition, and the "action" that occurs at the time of the transition. In other words, the state transition model transitions the software or its controlled system by accepting the new input (event) at the present in the “state” formed by the past input,
It means to express as performing an output (action) according to the event in the “state” at the time of transition. On the other hand, the hardware control software accepts a new current “input” in the “state” of the hardware formed by past inputs from the sensor or switch, and responds to the current input in the state. It issues a hardware control command. As described above, since the state transition model originally has a common configuration with the control software, it is suitable for describing the control software.
【0005】また、状態遷移モデルは、内容が具体的に
特定されたいわゆる形式的な記述手法であるため、状態
遷移モデル仕様に基づいてプログラムを自動的に生成す
ることが可能である。前記のプログラム自動生成装置
は、これらの事実に基づいたもので、制御ソフトウェア
のプログラム自動生成に特に適したものである。Further, since the state transition model is a so-called formal description method whose contents are specifically specified, it is possible to automatically generate a program based on the state transition model specification. The automatic program generator described above is based on these facts and is particularly suitable for automatic program generation of control software.
【0006】なお、ここでいうプログラムは、一定のプ
ログラム言語の形式で表現されたソフトウェアを意味
し、代表的には、コンパイラによる機械語への翻訳が可
能なソース・コードや、インタプリタによる逐次実行が
可能なものであり、また、機械語に翻訳されたいわゆる
オブジェクト・プログラムを含めて把握することができ
る。The program mentioned here means software expressed in the form of a certain programming language, and typically, a source code that can be translated into a machine language by a compiler or sequential execution by an interpreter. It is possible to understand, including a so-called object program translated into a machine language.
【0007】そして、ソフトウェアの状態遷移モデルに
おいては、制御対象であるシステムは、システムを構成
する複数の各ユニットの状態の組み合わせによって定義
される。なお、ハードウェアであるシステムを構成する
ユニットは主にハードウェアであるが、ソフトウェア・
システムを構成するユニットとしては、マルチタスクシ
ステムにおける各ジョブや、OSに含まれるアクセス制
御部などのソフトウェア的要素が含まれる。In the software state transition model, the system to be controlled is defined by the combination of the states of each of the plurality of units constituting the system. The units that make up the system, which is hardware, are mainly hardware, but software and
The units constituting the system include each job in the multitask system and software elements such as an access control unit included in the OS.
【0008】ここで、複数の「状態」による制御対象シ
ステムの表現は、次のように行われる、例えば、制御対
象がユニットAとユニットBという2つのハードウェア
ユニットから構成されたシステムにおいて、ユニットA
は2種類、ユニットBは3種類の状態を取り得る場合、
システム全体の状態としては、ユニットA、ユニットB
の状態の組合せ、すなわち2×3=6で6種類の状態に
遷移する可能性がある。したがって、このシステムの制
御ソフトウェアの状態遷移モデル仕様では、前記6種類
の状態から現実に起こり得る状態を選択したうえ、それ
らの間に適切な遷移、イベントやアクションを加えた形
で表現される。The expression of the controlled system by a plurality of "states" is performed as follows. For example, in a system in which the controlled system is composed of two hardware units, a unit A and a unit B, A
If there are 2 types of states and unit B can have 3 types of states,
The state of the entire system is as follows: Unit A, Unit B
There is a possibility of transitioning to 6 types of states by the combination of states, that is, 2 × 3 = 6. Therefore, in the state transition model specification of the control software of this system, a state that can actually occur is selected from the six types of states, and appropriate transitions, events and actions are added between them.
【0009】[0009]
【発明が解決しようとする課題】 (1)ところで、制御対象システムにおいて、機能向上
やマン・マシン・インタフェースの改良等の理由によっ
てシステム構成が変更され、ユニットが追加・変更・除
去(本明細書において「変更」と総称する。)されるケ
ースも一般的である。そして、このようなシステム構成
の変更があった場合は、これに対応して制御ソフトウェ
アを変更する必要がある。(1) By the way, in a controlled system, a system configuration is changed due to a function improvement, a man-machine interface improvement, or the like, and units are added / changed / removed. In this case, it is generally referred to as "change" in). Then, when such a system configuration is changed, it is necessary to change the control software accordingly.
【0010】例えば、前記のユニットA,Bからなるシ
ステムに新たなユニットCが追加され、このユニットC
も2つの状態を取り得るとすると、ユニットCを含むシ
ステムの遷移可能な状態は、2×3×2=12で、12
種類に倍増することとなる。しかも、この12種類の状
態の定義は、ユニットCを含むものであるから、ユニッ
トC追加前の6種類の状態とはいずれも異なるものであ
る。そして、従来のプログラム自動生成装置では、状態
遷移モデル仕様の全体が一体不可分のものとして取り扱
われていた。したがって、従来のプログラム自動生成装
置では、このような変更があった場合、ユニットC追加
後のソフトウェアの仕様は、追加前のものとはまったく
別個独立に書き直さなくてはならなかった。For example, a new unit C is added to the system including the units A and B, and the unit C
If two states are possible, the transitionable state of the system including the unit C is 2 × 3 × 2 = 12, and 12
The number will be doubled. Moreover, since the definitions of the 12 types of states include the unit C, they are all different from the 6 types of states before the addition of the unit C. In the conventional program automatic generation device, the entire state transition model specification is treated as an integral part. Therefore, in the conventional program automatic generation device, when such a change is made, the software specification after the addition of the unit C has to be rewritten completely independently of that before the addition.
【0011】特に、このような場合、変更のなかったユ
ニット個々の仕様は、ほとんど、あるいはまったく変わ
らないのが通常である。にもかかわらず、従来のプログ
ラム自動生成装置では、前記のように、ソフトウェア全
体の仕様の全面的書き直しを要するため、変更のなかっ
たユニットに係る部分の仕様も再利用ができなかった。
このため、プログラムの生産効率の向上が困難であっ
た。In particular, in such a case, the specifications of the individual units that have not changed are usually little or not changed at all. Nevertheless, in the conventional program automatic generation device, as described above, the specification of the entire software needs to be completely rewritten, so that the specification of the part related to the unit that has not been changed cannot be reused.
Therefore, it is difficult to improve the production efficiency of the program.
【0012】(2)また、従来のプログラム自動生成装
置では、制御対象システムの状態は、システムを構成す
る全ユニットの状態の組み合わせによって定義されてい
た。このため、システムを構成するユニット数が多い場
合、仕様を記述するための状態数は、個々のユニットの
取り得る状態の組み合わせ数に近い膨大な数となってい
た。このため、従来のプログラム自動生成装置では、仕
様全体の記述量が増大すると共に、その記述内容も複雑
なものとなり、仕様の記述や読解が困難となっていた。(2) Further, in the conventional automatic program generation device, the state of the controlled system is defined by the combination of the states of all units constituting the system. For this reason, when the number of units that make up the system is large, the number of states for describing the specifications is an enormous number, which is close to the number of possible combinations of states of individual units. For this reason, in the conventional program automatic generation device, the description amount of the entire specification increases and the description content becomes complicated, and it is difficult to describe and read the specification.
【0013】本発明は、上記のような従来技術の問題点
を解決するために提案されたもので、その目的は、制御
対象システムを構成するユニットの変更に対しても、変
更のなかったユニットに関する仕様を再利用できる、優
れたプログラム自動生成装置を提供することにある。ま
た、本発明の他の目的は、ユニット数が多数となった場
合においてもコンパクトかつ簡明な仕様記述の可能な、
優れたプログラム自動生成装置を提供することである。The present invention was proposed in order to solve the problems of the prior art as described above, and its purpose is to make a unit that does not change even when the unit constituting the controlled system is changed. An object of the present invention is to provide an excellent program automatic generation device capable of reusing the specification regarding. Another object of the present invention is to enable compact and simple specification even when the number of units is large.
An object is to provide an excellent automatic program generation device.
【0014】[0014]
【課題を解決するための手段】上記の目的を達するた
め、本発明のプログラム自動生成装置は、ユニットから
構成されるシステムに関するソフトウェアのプログラム
を、前記ソフトウェアの仕様に基づいて生成するプログ
ラム自動生成装置において、前記ユニットごとの前記仕
様を状態遷移モデルで入力するユニット独自仕様入力手
段と、前記ユニット間の相関関係を表す相関仕様を状態
遷移モデルで入力する相関仕様入力手段と、前記ユニッ
ト独自仕様を保存するユニット独自仕様保存手段と、前
記相関仕様を保存する相関仕様保存手段と、前記各仕様
に基づいて前記プログラムを生成するプログラム生成手
段と、生成された前記プログラムを出力する出力手段と
を有することを特徴とする。To achieve the above object, an automatic program generation device of the present invention is a program automatic generation device for generating a software program relating to a system composed of units based on the specifications of the software. In, unit unique specification input means for inputting the specifications for each unit in a state transition model, correlation specification input means for inputting correlation specifications representing the correlation between the units in a state transition model, and unit unique specifications It has a unit unique specification saving means for saving, a correlation specification saving means for saving the correlation specification, a program creating means for creating the program based on each of the specifications, and an output means for outputting the created program. It is characterized by
【0015】[0015]
【作用】上記のような構成を有する本発明は、次のよう
な作用を有する。すなわち、本発明では、各ユニット独
自の仕様は、ユニット独自仕様入力手段からユニット独
自仕様として入力され、ユニット独自仕様保存手段に保
存される。一方、各ユニット間の相関仕様は、相関仕様
入力手段から相関仕様として入力され、相関仕様保存手
段に保存される。そして、プログラムの自動生成は、プ
ログラム生成手段によって、前記各仕様に基づいて行わ
れる。The present invention having the above structure has the following functions. That is, in the present invention, the specification unique to each unit is input as the unit unique specification from the unit unique specification input means and stored in the unit unique specification storage means. On the other hand, the correlation specification between each unit is input as the correlation specification from the correlation specification input means and stored in the correlation specification storage means. Then, the automatic generation of the program is performed by the program generation means based on the above-mentioned specifications.
【0016】以上のように、本発明によれば、ユニット
間の相関仕様が、ユニット独自のユニット独自仕様とは
別個に取り扱われるので、ユニット変更に対しても、原
則として相関仕様のみを変更すれば足り、変更のないユ
ニットの仕様は再利用が可能となる。As described above, according to the present invention, the correlation specifications between units are handled separately from the unit-specific specifications unique to each unit. Therefore, in principle, only the correlation specifications need to be changed when the unit is changed. Unit specifications that are sufficient or unchanged can be reused.
【0017】また、本発明では、ユニット間の相関仕様
が、ユニット独自のユニット独自仕様とは別個に取り扱
われるので、制御対象システム全体としての仕様は、シ
ステム全体としての状態やこの状態間の遷移に関係する
ユニットの動作のみによって表現することができる。し
たがって、システム全体の状態ごとにシステムを構成す
る全ユニットの状態を定義する必要がなくなり、ユニッ
ト数が多数となった場合においてもコンパクトかつ簡明
な仕様記述が可能となる。Further, in the present invention, the correlation specifications between units are handled separately from the unit-specific specifications unique to each unit. Therefore, the specifications of the entire controlled system are the states of the entire system and the transitions between these states. Can be expressed only by the operation of the unit related to. Therefore, it is not necessary to define the states of all the units that configure the system for each state of the entire system, and compact and simple specification description is possible even when the number of units is large.
【0018】[0018]
【実施例】以下、本発明の一実施例であるプログラム自
動生成装置(以下、「本装置」という。)について、図
面に従って具体的に説明する。なお、本装置はコンピュ
ータ上に実現されるもので、本装置の各機能は、プログ
ラムの形式で表現された所定の手順でコンピュータを動
作させることによって実現されている。したがって、以
下、本装置の各機能を有する仮想的回路ブロックを想定
して本装置を説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An automatic program generation device (hereinafter referred to as "this device") which is an embodiment of the present invention will be specifically described below with reference to the drawings. It should be noted that this device is realized on a computer, and each function of this device is realized by operating the computer in a predetermined procedure expressed in the form of a program. Therefore, the present apparatus will be described below assuming a virtual circuit block having each function of the apparatus.
【0019】(1)実施例の構成…図1 本装置は状態遷移モデル仕様に基づいてコンパイル用ソ
ースコードを生成するもので、図1は、本装置の構成図
である。本装置は、この図1に示すように、キーボード
などの入力装置1と、制御対象システムを構成する各ユ
ニット独自のユニット独自仕様を状態遷移モデルで記述
・入力するためのユニット独自仕様入力部2とを有して
いる。また、本装置は、前記各ユニットとユニット外部
との関係を表すユニット対外仕様を、状態遷移モデルで
記述・入力するためのユニット対外仕様入力部3と、シ
ステム全体からみた各ユニット間の相関関係を前記ユニ
ット対外仕様に基づいて表した全体相関仕様を、状態遷
移モデルで記述・入力するための全体相関仕様入力部4
とを有している。(1) Configuration of the embodiment ... FIG. 1 This device generates a source code for compilation based on the state transition model specification. FIG. 1 is a configuration diagram of this device. As shown in FIG. 1, the present apparatus includes an input device 1 such as a keyboard and a unit unique specification input unit 2 for describing and inputting a unit unique specification unique to each unit constituting a controlled system by a state transition model. And have. In addition, the present apparatus includes a unit-external-specification input unit 3 for describing and inputting a unit external-specification indicating a relationship between each unit and the outside of the unit with a state transition model, and a correlation between the units as viewed from the entire system. An overall correlation specification input unit 4 for describing and inputting an overall correlation specification, which is expressed based on the unit external specifications, by a state transition model.
And have.
【0020】なお、ユニット対外仕様及び全体相関仕様
は、前記相関仕様に相当するものである。また、ユニッ
ト独自仕様入力部2は、入力装置1と共に前記ユニット
独自仕様入力手段を構成している。また、ユニット対外
仕様入力部3及び全体相関仕様入力部4は、入力装置1
と共に、前記相関仕様入力手段を構成している。The unit external specifications and the overall correlation specifications correspond to the correlation specifications. Further, the unit unique specification input section 2 constitutes the unit unique specification input means together with the input device 1. Further, the unit external specification input unit 3 and the overall correlation specification input unit 4 are the input device 1
Together with this, the correlation specification input means is configured.
【0021】また、本装置は、前記ユニット独自仕様、
ユニット対外仕様及び全体相関仕様を、相互に別個に保
存する仕様保存部5(前記ユニット独自仕様保存手段及
び前記相関仕様保存手段としての役割を併有するもの)
を有している。また、本装置は、前記各仕様に含まれる
要素と各要素に対応するソースコード上の表現との対照
テーブルを入力するための対照テーブル入力部6と、前
記対照テーブルを保存する対照テーブル保存部7とを有
している。また、本装置は、前記各仕様および前記対照
テーブルに基づいて、各ユニット仕様ごと及び各全体相
関仕様ごとに中間ソースコードへ変換する中間ソースコ
ード生成部8とを有している。Further, the present apparatus is provided with the unit unique specification,
A specification storage unit 5 for separately storing the unit external specifications and the overall correlation specifications (having a role as both the unit unique specification storage means and the correlation specification storage means)
have. The apparatus also includes a comparison table input unit 6 for inputting a comparison table of the elements included in each of the specifications and expressions on the source code corresponding to each element, and a comparison table storage unit for storing the comparison table. 7 and 7. Further, the apparatus has an intermediate source code generation unit 8 for converting into an intermediate source code for each unit specification and for each overall correlation specification based on the specifications and the comparison table.
【0022】また、本装置は、前記中間ソースコード生
成部8で生成された複数の中間ソースコードを保存する
中間ソースコード保存部9と、前記中間ソースコード保
存部9に保存された複数の中間ソースコードをリンクし
て、最終ソースコードを生成する中間ソースコードリン
ク部10とを有している。また、本装置は、前記中間ソ
ースコードリンク部10で生成された最終ソースコード
を保存する最終ソースコード保存部11を有している。
なお、前記中間ソースコード生成部8及び前記中間ソー
スコードリンク部10は、前記プログラム生成手段を構
成している。また、前記最終ソースコード保存部11は
最終ソースコードを外部に出力する機構を備えており、
プログラム出力手段に相当している。また、本装置は、
図示はしないが、必要なI/O制御回路や表示装置を備
えている。The apparatus also includes an intermediate source code storage unit 9 for storing a plurality of intermediate source codes generated by the intermediate source code generation unit 8 and a plurality of intermediate sources stored in the intermediate source code storage unit 9. An intermediate source code link unit 10 that links source codes to generate a final source code. The apparatus also has a final source code storage unit 11 that stores the final source code generated by the intermediate source code link unit 10.
The intermediate source code generating unit 8 and the intermediate source code linking unit 10 constitute the program generating means. The final source code storage unit 11 has a mechanism for outputting the final source code to the outside.
It corresponds to the program output means. In addition, this device
Although not shown, it is provided with necessary I / O control circuits and display devices.
【0023】(2)実施例の作用…図2〜図10 次に、上記のような構成を有する本実施例におけるプロ
グラム自動生成について、実例を挙げて説明する。この
実例は、銀行などの金融機関で用いられる現金自動預払
機システムを制御する制御ソフトウェアの一部であり、
このシステムを構成するカードユニットと、暗証ユニッ
トを制御するものである。(2) Operation of the embodiment ... FIGS. 2 to 10 Next, the automatic program generation in the present embodiment having the above-mentioned configuration will be described with reference to an actual example. This example is a part of control software that controls an automatic teller machine system used in a financial institution such as a bank.
It controls the card unit and the password unit that make up this system.
【0024】[情報の入力]本実施例におけるプログラ
ム自動生成では、ユーザは、まず、制御対象システムを
構成する各ユニットごとに、ユニット独自仕様を状態遷
移モデルで入力する。ここで、図2は前記実例のカード
ユニットに係るユニット独自仕様の一例であり、カード
を取り込み、カードの磁気テープを読み、印字位置にセ
ットをするという動作を表現している。また、図3は前
記実例の暗証ユニットに係るユニット独自仕様の一例で
あり、暗証の入力を受け付け、それをチェックするとい
う動作を表現している。これらの状態遷移モデル仕様で
は、円形で表された各状態間の遷移が矢印で表され、各
遷移には、その遷移に係るイベントとアクションとが、
“/”(スラッシュ)で区切られて記入されている。[Input of Information] In the automatic program generation in this embodiment, the user first inputs the unit-specific specifications by the state transition model for each unit constituting the controlled system. Here, FIG. 2 is an example of a unit unique specification relating to the card unit of the above-mentioned example, and represents an operation of taking in a card, reading a magnetic tape of the card, and setting at a printing position. Further, FIG. 3 is an example of a unit unique specification relating to the above-described personal identification unit, and represents an operation of receiving an input of a personal identification and checking it. In these state transition model specifications, transitions between states represented by circles are represented by arrows, and each transition has an event and an action related to the transition.
It is written separated by "/" (slash).
【0025】また、ユーザは、カードユニットと暗証ユ
ニットの間の相関関係を、ユニット対外仕様及び全体相
関仕様の入力によって規定する。すなわち、本実施例で
は、各ユニット間の相関は、ユニット対外仕様と全体相
関仕様との2段階によって記述される。ここで、ユニッ
ト対外仕様は、各ユニットごとに、そのユニットとユニ
ット外部との関係を表したものであり、具体的には、ユ
ニット独自仕様の遷移のうち、ユニット外部と関係する
ものに、特定の名称のイベントやアクションを加入する
ことによって入力される。また、全体相関仕様は、シス
テム全体からみた各ユニット間の相関関係を表したもの
で、具体的には、システム全体としての遷移ごとに、そ
の遷移を生じさせるユニットからのイベントや、その遷
移の際に生じるユニット向けのアクションを、ユニット
対外仕様で用いられるのと同一の名称で記述したもので
ある。Further, the user defines the correlation between the card unit and the personal identification unit by inputting the unit external specification and the overall correlation specification. That is, in the present embodiment, the correlation between each unit is described by two stages of the unit external specification and the overall correlation specification. Here, the unit-to-outside specification represents the relationship between the unit and the outside of the unit for each unit. Specifically, among the transitions of the unit-specific specifications, those specific to the outside of the unit are specified. Entered by subscribing to an event or action named. In addition, the overall correlation specification expresses the correlation between each unit viewed from the entire system. Specifically, for each transition of the entire system, the event from the unit that causes that transition and the transition The action for the unit that occurs at that time is described by the same name as used in the unit external specification.
【0026】例えば、前記実例のシステムにおける現金
払い出し動作において、カードを取り込み、カードの磁
気テープから暗証番号を読み取る動作と平行して、操作
者の暗証番号入力を受け付けるとする。そして、その後
カードから読み込んだ暗証番号と操作者の入力した暗証
番号とを照合する場合、カードからの読み取りが終了す
るまでは暗証番号の照合を開始することはできないとい
う制限が必要となる。この制限がカードユニットと暗証
ユニットとの間の相関となるので、この相関を次のよう
に入力する。For example, in the cash payout operation in the system of the above-mentioned example, it is assumed that the operator inputs the personal identification number in parallel with the operation of taking in the card and reading the personal identification number from the magnetic tape of the card. Then, when collating the personal identification number read from the card with the personal identification number input by the operator thereafter, there is a limitation that the collation of the personal identification number cannot be started until the reading from the card is completed. Since this restriction is a correlation between the card unit and the secret code unit, this correlation is entered as follows.
【0027】まず、各ユニットの独自仕様に、ユニット
対外仕様を加入する。図4は、カードユニットのユニッ
ト独自仕様に、ユニット対外仕様を加入した例であり、
また、図5は、暗証ユニットのユニット独自仕様にユニ
ット対外仕様を加入した例である。なお、これらの図で
は、ユニット対外仕様の部分が網かけで表現されてい
る。すなわち、図4では、遷移「磁気テープ読み取り完
了」の際に、磁気テープを読み終ったことを外部に知ら
せるためのアクション「カード準備OK」が加入されて
いる。また、図5では、遷移「入力完了」を生じさせる
イベントとして、「チェック開始」が加重されている。
これらのユニット対外仕様は、カードユニットが状態
「印字位置にセット中」へ進むまで、暗証ユニットが状
態「チェック中」に進めないように制御するためのもの
である。そして、ユーザは、図6のような全体相関(イ
ンタラクション)仕様を記述・入力することによってカ
ードユニットと暗証ユニット間で、このような制御を実
現する。First, the unit external specifications are added to the unique specifications of each unit. FIG. 4 is an example in which a unit external specification is added to the unit unique specification of the card unit,
Further, FIG. 5 is an example in which the unit external specifications are added to the unit unique specifications of the personal identification unit. It should be noted that in these drawings, the portion of the external specifications of the unit is represented by shading. That is, in FIG. 4, at the time of the transition “magnetic tape reading completed”, the action “card preparation OK” for notifying the outside that the reading of the magnetic tape is completed is added. Further, in FIG. 5, “check start” is weighted as the event that causes the transition “input completion”.
These unit-to-outside specifications are for controlling so that the personal identification unit cannot proceed to the state "checking" until the card unit proceeds to the state "setting in the printing position". Then, the user implements such control between the card unit and the personal identification unit by describing and inputting the overall correlation (interaction) specifications as shown in FIG.
【0028】すなわち、図6の全体相関仕様は、システ
ム全体の状態「カード準備中」が、イベント「カード準
備OK」を条件として「暗証チェック中」に遷移し、こ
の遷移の際、アクション「チェック開始」が発せられる
ことを意味している。すなわち、前述したアクション
「カード準備OK」およびイベント「チェック開始」は
ユニット独自仕様と全体相関仕様との間の情報通信の手
段となっている。That is, according to the overall correlation specification of FIG. 6, the state "card preparing" of the entire system transits to "password checking" on condition of the event "card preparation OK", and at the time of this transition, the action "checking" is performed. It means that "start" is issued. That is, the above-mentioned action "card preparation OK" and event "check start" are means for information communication between the unit-specific specifications and the overall correlation specifications.
【0029】そして、遷移の際に発せられるアクション
は、受け側においてはイベントとなるので、図6の全体
相関仕様は、換言すれば、次のようなことを意味してい
る。すなわち、システム全体は、最初は「カード準備
中」の状態にあり、システムがカードユニットから状態
「印字位置にセット中」へ進んだことを知らせるアクシ
ョン「カード準備OK」を受けとると、暗証ユニットに
対して「チェック中」へ進んで良いことを知らせるイベ
ント「チェック開始」を発行する。なお、入力された以
上のような各仕様は、仕様保存部5に保存される。Since the action issued at the time of transition becomes an event on the receiving side, in other words, the overall correlation specification of FIG. 6 means the following. In other words, the entire system is initially in the "card preparation" state, and when the action "card preparation OK" is sent to notify that the system has proceeded from the card unit to the state "setting in the printing position", the secret code unit is notified. On the other hand, the event "Check start" is issued to inform the user that he / she can proceed to "Checking". The specifications as described above are stored in the specification storage unit 5.
【0030】また、ユーザは、状態遷移モデル仕様から
ソースコードへの変換に用いる対照テーブルを入力す
る。ここで、図7は、前記実例における対照テーブルで
あり、仕様上のイベントおよびアクションと、ソースコ
ード上の表現との対応で記述されている。この対照テー
ブルでは、前述したユニット独自仕様と全体相関仕様間
の情報通信手段を除くすべてのイベント、アクションに
ついて対応関係が記述されている。この対照テーブル
は、対照テーブル保存部7に保存される。Further, the user inputs a comparison table used for converting the state transition model specification into the source code. Here, FIG. 7 is a comparison table in the above-described example, and is described by the correspondence between the events and actions in the specifications and the expressions in the source code. In this comparison table, correspondence relationships are described for all events and actions except for the information communication means between the unit-specific specifications and the overall correlation specifications described above. This reference table is stored in the reference table storage unit 7.
【0031】[プログラムの生成]以上のような情報の
入力後、中間ソースコード生成部8は、これら情報に基
づいて中間ソースコードを生成し、中間ソースコード保
存部9がこれを保存する。なお、このようなソースコー
ドの生成は、各仕様のデータに含まれる状態名などの固
有的文字列データを、その種類・順序や相互関係に応じ
て分類し、プログラム言語の命令語などの定型文と共
に、所定の順序で出力することによって実現することが
できる。ここで、図8及び図9は、前記実例に係る中間
ソースコードの例であり、図8はユニット独自仕様及び
ユニット対外仕様に対応するもの、図9は全体相関(イ
ンタラクション)仕様に対応するものである。なお、こ
の中間ソースコードでは、「カード準備OK」および
「チェック開始」は仕様の表現がそのまま使われてお
り、ソースコードには変換されていない。[Generation of Program] After inputting the above information, the intermediate source code generation unit 8 generates an intermediate source code based on the information, and the intermediate source code storage unit 9 stores the generated intermediate source code. It should be noted that such source code is generated by classifying unique character string data such as state names included in the data of each specification according to the type, order, and mutual relation, and formulating such as command words of the programming language. It can be realized by outputting in a predetermined order together with the sentence. Here, FIG. 8 and FIG. 9 are examples of the intermediate source code according to the above-mentioned example, FIG. 8 corresponds to the unit unique specification and unit external specification, and FIG. 9 corresponds to the overall correlation (interaction) specification. Is. In this intermediate source code, the expressions of specifications are used as they are for “card preparation OK” and “start check”, and are not converted into source code.
【0032】最後に、中間ソースコードリンク部10
が、これら「カード準備OK」および「チェック開始」
の2つに対して固有のデータ名を割り当て、それに変換
した最終ソースコードを生成する。例えば仕様表現「カ
ード準備OK」、「チェック開始」に対してそれぞれデ
ータ名communicate1,communicate2 を割り当てる。する
と図10に示すように、「カード準備OK」、「チェッ
ク開始」という表現がソースコード上の表現に変換さ
れ、コンパイル可能な状態となる。つまり、ユニットの
仕様と全体相関仕様とが、ソースコード上でリンクされ
たことになる。Finally, the intermediate source code link section 10
However, these "card preparation OK" and "check start"
Unique data names are assigned to the two, and the final source code converted to them is generated. For example, the data names communicate1 and communicate2 are assigned to the specification expressions "card preparation OK" and "check start", respectively. Then, as shown in FIG. 10, the expressions “card preparation OK” and “check start” are converted into expressions on the source code, and the state becomes compilable. That is, the unit specifications and the overall correlation specifications are linked in the source code.
【0033】(3)実施例の効果 以上のように、本実施例によれば、ユニットごとのユニ
ット独自仕様と、ユニット間の相関関係を表すユニット
対外仕様及び全体相関仕様が別個に取り扱われるので、
制御対象システムを構成するユニットの変更に対して
も、変更のなかったユニットに関する仕様を再利用する
ことができるので、システム全体の仕様の全面的書き直
しは不要となり、ソフトウェアの生産効率が向上する。
例えば、前記の実例に新たなユニット(例えば振込券ユ
ニット)が追加された場合、カードユニット、暗証ユニ
ットの独自の動作に変更がないのであれば、図2から図
5の仕様に関しては、そのまま再利用することが可能で
ある。また、他のユニットに影響を与えるユニットが変
更された場合は、影響を受けるユニットのユニット対外
仕様を変更する必要があるが、ユニット独自仕様はその
まま再利用することができる。(3) Effects of the Embodiment As described above, according to this embodiment, the unit-specific specifications for each unit, and the unit external specification and the overall correlation specification indicating the correlation between the units are handled separately. ,
Even if the units that make up the controlled system are changed, the specifications relating to the unchanged units can be reused, so that it is not necessary to completely rewrite the specifications of the entire system, and the software production efficiency is improved.
For example, when a new unit (for example, a transfer ticket unit) is added to the above-mentioned example, and there is no change in the original operation of the card unit and the personal identification unit, the specifications of FIGS. It is possible to use. Also, when a unit that affects another unit is changed, it is necessary to change the unit external specifications of the affected unit, but the unit-specific specifications can be reused as they are.
【0034】また、本実施例によれば、制御対象システ
ムの状態は、全体相関仕様によって各ユニットの状態と
は別個のものとして定義されるので、システムを構成す
るユニット数が多い場合においても、仕様を記述するた
めの状態数は、個々のユニットの取り得る状態の組み合
わせ数よりもはるかに少ないものとなる。このため、仕
様全体の記述量が減少してコンパクト化されると共に記
述内容も簡明なものとなり、仕様の記述や読解が容易に
なる。Further, according to this embodiment, the state of the controlled system is defined as being different from the state of each unit according to the overall correlation specification. Therefore, even when the number of units constituting the system is large, The number of states to describe a specification is far smaller than the number of possible combinations of states of individual units. For this reason, the description amount of the entire specification is reduced, the size is made compact, and the description content is simple, and the description and reading of the specification are easy.
【0035】例えば、ユニットがA、B、C、D、Eと
5つあり、それぞれが3つの状態を取り得るとする。こ
のとき、従来の仕様では、システム全体の状態も、各ユ
ニットの状態の組み合わせとして記述する必要があった
ので、システム全体として仕様に記述する状態数は、3
×3×3×3×3=243より、約243であった。し
かし、このような場合も、本実施例によれば、それぞれ
のユニットのユニット独自仕様や全体相関仕様によって
表現できるので、全体相関仕様上に現れる状態数をkと
すると、3+3+3+3+3+k=15+kより、ユニ
ットごととシステム全体の合計状態数でも15+kにと
どまることになる。このように、243−15=228
から考えて、全体相関仕様上に現れる状態数が、200
を越えるようなシステムでない限り、各ユニット及びシ
ステム全体の仕様を記述するために必要な合計状態数は
かなり少なくなり、仕様の記述、読解が容易になる。For example, it is assumed that there are five units, A, B, C, D, and E, and each of them can have three states. At this time, according to the conventional specifications, the state of the entire system also needs to be described as a combination of the states of the units, so the number of states described in the specification for the entire system is 3
From × 3 × 3 × 3 × 3 = 243, it was about 243. However, even in such a case, according to the present embodiment, since it can be expressed by the unit unique specification or the overall correlation specification of each unit, if the number of states appearing in the overall correlation specification is k, then 3 + 3 + 3 + 3 + 3 + k = 15 + k The total number of states for each system and the entire system will remain at 15 + k. Thus, 243-15 = 228
Therefore, the number of states appearing in the overall correlation specification is 200
Unless the system exceeds the limit, the total number of states required to describe the specifications of each unit and the entire system is considerably small, and the description and reading of the specifications are easy.
【0036】(4)他の実施例 なお、本発明は上記実施例に限定されるものではなく、
次のような他の実施例をも包含するものである。例え
ば、上記実施例に示した仕様の書式は状態遷移モデル仕
様の一例であり、状態を表すノードを四角形で表すな
ど、他の書式の状態遷移モデル仕様を自由に用いること
ができる。同様に、上記実施例で示したソースコードも
ソースコードの一例に過ぎず、ソースコードとしてどの
言語を用いるかは自由である。さらに、プログラムの生
成において、ソースコードのみならず、機械語によるオ
ブジェクト・プログラム・モジュールを生成するように
してもよい。また、対照テーブルの入力を省略し、プロ
グラム生成手段が各イベント名やアクション名に、適当
なソースコード表現を割り当てるようにしてもよい。ま
た、上記実施例のプログラム自動生成装置はコンピュー
タ上に実現されているが、その機能の全部又は一部は専
用の電子回路上に実現してもよい。(4) Other Embodiments The present invention is not limited to the above embodiments,
The following other examples are also included. For example, the format of the specifications shown in the above embodiments is an example of the state transition model specifications, and the state transition model specifications of other formats can be freely used, such as representing a node representing a state with a rectangle. Similarly, the source code shown in the above embodiment is only an example of the source code, and which language is used as the source code is arbitrary. Further, in generating a program, not only the source code but also an object program module in machine language may be generated. Further, the input of the comparison table may be omitted, and the program generation means may assign an appropriate source code expression to each event name or action name. Further, although the automatic program generation device of the above-described embodiment is realized on a computer, all or part of the functions thereof may be realized on a dedicated electronic circuit.
【0037】[0037]
【発明の効果】以上のように、本発明によれば、制御対
象システムを構成するユニットの変更に対しても、変更
のなかったユニットに関する仕様を再利用できる、優れ
たプログラム自動生成装置を提供することができるの
で、ソフトウェアの生産効率が向上する。また、本発明
によれば、ユニット数が多数となった場合においてもコ
ンパクトかつ簡明な仕様記述の可能な、優れたプログラ
ム自動生成装置を提供することができるので、ユニット
数が増大した場合においても、仕様の記述や読解が容易
になる。As described above, according to the present invention, it is possible to provide an excellent program automatic generation device capable of reusing the specifications relating to a unit that has not been changed, even when the unit constituting the controlled system is changed. Therefore, the production efficiency of software is improved. Further, according to the present invention, it is possible to provide an excellent program automatic generation device capable of compact and simple specification description even when the number of units is large, and therefore even when the number of units is increased. , It becomes easy to describe and read the specifications.
【図1】本発明の実施例のプログラム自動生成装置の構
成図。FIG. 1 is a configuration diagram of a program automatic generation device according to an embodiment of the present invention.
【図2】本発明の実施例におけるユニット独自仕様の実
例(カードユニット)。FIG. 2 is an example of a unit unique specification (card unit) in the embodiment of the invention.
【図3】本発明の実施例におけるユニット独自仕様の実
例(暗証ユニット)。FIG. 3 is an example of a unit unique specification in the embodiment of the present invention (password unit).
【図4】本発明の実施例における実例のユニット独自仕
様にユニット対外仕様を加入した内容を示す図(カード
ユニット)。FIG. 4 is a diagram (card unit) showing the contents in which the unit external specification is added to the unit unique specification of the example in the embodiment of the present invention.
【図5】本発明の実施例における実例のユニット独自仕
様にユニット対外仕様を加入した内容を示す図(暗証ユ
ニット)。FIG. 5 is a diagram showing the contents of adding the unit external specifications to the unit unique specifications of the actual example in the embodiment of the present invention (password unit).
【図6】本発明の実施例における全体相関仕様の実例。FIG. 6 shows an example of overall correlation specifications in the embodiment of the present invention.
【図7】本発明の実施例における対照テーブルの実例。FIG. 7 is an example of a comparison table according to an embodiment of the present invention.
【図8】本発明の実施例における中間ソースコードの実
例(ユニットごとの仕様に対応するもの)。FIG. 8 is an example of an intermediate source code according to an embodiment of the present invention (corresponding to specifications for each unit).
【図9】本発明の実施例における中間ソースコードの実
例(全体相関仕様に対応するもの)。FIG. 9 is an example of an intermediate source code according to an embodiment of the present invention (corresponding to the overall correlation specification).
【図10】本発明の実施例における最終ソースコードの
実例。FIG. 10 is an example of final source code according to an embodiment of the present invention.
1:入力装置 2:ユニット独自仕様入力部 3:ユニット対外仕様入力部 4:全体相関仕様入力部 5:仕様保存部 6:対照テーブル入力部 7:対照テーブル保存部 8:中間ソースコード生成部 9:中間ソースコード保存部 10:中間ソースコードリンク部 11:最終ソースコード保存部 1: Input device 2: Unit unique specification input unit 3: Unit external specification input unit 4: Overall correlation specification input unit 5: Specification storage unit 6: Control table input unit 7: Control table storage unit 8: Intermediate source code generation unit 9 : Intermediate source code storage unit 10: Intermediate source code link unit 11: Final source code storage unit
Claims (1)
るソフトウェアのプログラムを、前記ソフトウェアの仕
様に基づいて生成するプログラム自動生成装置におい
て、 前記ユニットごとの前記仕様を状態遷移モデルで入力す
るユニット独自仕様入力手段と、 前記ユニット間の相関関係を表す相関仕様を状態遷移モ
デルで入力する相関仕様入力手段と、 前記ユニット独自仕様を保存するユニット独自仕様保存
手段と、 前記相関仕様を保存する相関仕様保存手段と、 前記各仕様に基づいて前記プログラムを生成するプログ
ラム生成手段と、 生成された前記プログラムを出力する出力手段とを有す
ることを特徴とするプログラム自動生成装置。1. A program automatic generation apparatus for generating a software program relating to a system composed of units based on the specifications of the software, unit unique specification input means for inputting the specifications of each unit by a state transition model. A correlation specification input means for inputting a correlation specification representing a correlation between the units in a state transition model, a unit unique specification saving means for saving the unit unique specification, and a correlation specification saving means for saving the correlation specification. An automatic program generation device comprising: a program generation unit that generates the program based on each of the specifications; and an output unit that outputs the generated program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1525593A JPH06230949A (en) | 1993-02-02 | 1993-02-02 | Automatic program generating device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1525593A JPH06230949A (en) | 1993-02-02 | 1993-02-02 | Automatic program generating device |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH06230949A true JPH06230949A (en) | 1994-08-19 |
Family
ID=11883753
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP1525593A Pending JPH06230949A (en) | 1993-02-02 | 1993-02-02 | Automatic program generating device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH06230949A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2006109558A1 (en) * | 2005-04-06 | 2006-10-19 | Fukuoka Industry, Science & Technology Foundation | Verification support device, verification support method, program, and recording medium |
-
1993
- 1993-02-02 JP JP1525593A patent/JPH06230949A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2006109558A1 (en) * | 2005-04-06 | 2006-10-19 | Fukuoka Industry, Science & Technology Foundation | Verification support device, verification support method, program, and recording medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4853873A (en) | Knowledge information processing system and method thereof | |
US6304922B2 (en) | Control system using plural objects, a programming method therefor, and a peripheral devices control system | |
JPH06230949A (en) | Automatic program generating device | |
JPH08329004A (en) | Method for improving terminal operability of application program use | |
Moebius et al. | Model-driven code generation for secure smart card applications | |
JP7447574B2 (en) | Support equipment, support programs and support methods | |
US5283895A (en) | Apparatus and method for processing data corresponding to word labels | |
JP2020119409A (en) | Program, information processing apparatus, and processing method | |
KR940002483B1 (en) | File update device and method | |
JP3545471B2 (en) | Information storage medium issuance processing data creation device and creation method | |
JPH0454635A (en) | Administrative processing method | |
JP2568634B2 (en) | Inference processor | |
Jarvis | EZLP: An Interactive Computer Program for Solving Linear Programming Problems. Final Report. | |
JP3034527B2 (en) | Editor device | |
JPH09297647A (en) | Item data input device | |
JPH10283426A (en) | Device for issuing check and method for managing check issue | |
JP2590281B2 (en) | Procedure Definition Screen Display Processing Method in Interactive Program Creation System | |
JPH10207702A (en) | Device for preparing software program | |
JPH02109133A (en) | Customizing system for package software | |
CN112967011A (en) | Contract automatic deployment method and system | |
JPS62203245A (en) | Error message output system | |
JPH07129381A (en) | Program document creation device | |
Varga et al. | PROCONSUL: an SDL tool set | |
JPH09101885A (en) | Program generator and its method | |
JP2003263315A (en) | Automatic program creating device |