JPH04271439A - Program verifying device - Google Patents

Program verifying device

Info

Publication number
JPH04271439A
JPH04271439A JP3031164A JP3116491A JPH04271439A JP H04271439 A JPH04271439 A JP H04271439A JP 3031164 A JP3031164 A JP 3031164A JP 3116491 A JP3116491 A JP 3116491A JP H04271439 A JPH04271439 A JP H04271439A
Authority
JP
Japan
Prior art keywords
item
graph
program
nodes
node
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.)
Withdrawn
Application number
JP3031164A
Other languages
Japanese (ja)
Inventor
Naoshi Uchihira
直志 内平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP3031164A priority Critical patent/JPH04271439A/en
Publication of JPH04271439A publication Critical patent/JPH04271439A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To logically verify the correctness of a program with respect to individual test data and to verify whether the program is correctly operated independently of test data or contingency in all cases or not. CONSTITUTION:An FST graph and a V item are read by an FST graph reader 1 and a V item reader 2 respectively. The V item is converted into a formula constituted of irreducible minimum operators by a V item converter 3, and all partial verification items constituting the V item are extracted. Subsequently, a dependency graph (DG) generated in accordance with the V item converted by the V item converter 3 and the FST graph by a dependency graph generator 4. When all nodes of the generated dependency graph are determined nodes, discrimination is performed by a discriminating device 6. If dependent nodes exist, they are successively converted into determined nodes by a dependency graph simplifying device 5, and finally, all dependent nodes are converted into determined nodes.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】[発明の目的][Object of the invention]

【0002】0002

【産業上の利用分野】本発明は、プログラム検証装置に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program verification device.

【0003】0003

【従来の技術】最近のエアーコンディショナーや電気炊
飯器等の家庭電化製品には、簡単なマイコンが組み込ま
れているものが多い。エアコンを制御するマイコンのよ
うに、装置に組み込まれた計算機は装置組み込み型計算
機と呼ばれている。そして、この組み込み型計算機を動
かすソフトウェアが装置組み込み型ソフトウェアと呼ば
れている。
2. Description of the Related Art Many of recent home appliances such as air conditioners and electric rice cookers incorporate simple microcomputers. A computer built into a device, such as a microcomputer that controls an air conditioner, is called a device-embedded computer. The software that runs this embedded computer is called device embedded software.

【0004】家電製品に限らず工作機械、ロボット、自
動車、飛行機、ロケットなど様々な機器に組み込み型計
算機が搭載されている。このように組み込み型システム
は大変ポピュラーになっきているが、複雑な組み込み型
システムにおいてはソフトウェアの生産性の悪さが大き
な問題となっている。アメリカ国防総省(DoD)が組
み込み型ソフトウェアの生産性を高めるために、197
9年以降Adaというプログラミング言語の設計、標準
化を推進しているのはそのためである。ロボットの分野
においても、半導体製造ラインの自動化設備にみられる
ように、ロボットはますます複雑化、高機能化してきて
おり、従来の手工業的ソフトウェア開発ではもはや限界
にきている。
[0004] Embedded computers are installed not only in home appliances but also in various equipment such as machine tools, robots, automobiles, airplanes, and rockets. Although embedded systems are becoming very popular, poor software productivity has become a major problem in complex embedded systems. The U.S. Department of Defense (DoD) has set out 197
This is why we have been promoting the design and standardization of the Ada programming language since 1999. In the field of robots, robots are becoming increasingly complex and sophisticated, as seen in the automation of semiconductor manufacturing lines, and conventional manual software development has reached its limits.

【0005】このような装置組み込み型ソフトウェアの
生産性を高めるためには、Adaのように記述するプロ
グラミング言語の高級化に加えてプログラム開発支援環
境の整備が必要不可欠である。特に、装置組み込み型ソ
フトウェアの開発過程で最もネックとなっていたテスト
/デバッグ段階を支援する意義は大きい。
[0005] In order to increase the productivity of such device-embedded software, it is essential to improve the programming language such as Ada, as well as to provide a program development support environment. In particular, it is of great significance to support the testing/debugging stage, which was the most bottleneck in the development process of device-embedded software.

【0006】装置組み込み型ソフトウェアは、大型計算
機上で開発する逐次処理プログラムと比べた場合、以下
の点で相違している。
Device-embedded software differs from sequential processing programs developed on large-scale computers in the following points.

【0007】(1)並行処理 装置あるいはシシステムの各構成要素が並行して動くな
らばそれは並行システムである。たとえば、工場におけ
るロボットなどの自動化装置のほとんどは本質的に並行
シシステムである。
(1) If each component of a parallel processing device or system operates in parallel, it is a parallel system. For example, most automation equipment such as robots in factories are inherently parallel systems.

【0008】(2)例外処理 装置の物理的なエラー(例えば、ロボットがパーツを掴
んで移動している最中にパーツが滑り落ちてしまう)に
対して、ソフトウェアが十分に対処できる必要がある。 このような物理的なエラーはある程度の確率で必ず発生
するという前提のもとで、装置組み込み型ソフトウェア
におけるエラー処理すなわち例外処理機構は不可欠であ
る。
(2) The software needs to be able to adequately deal with physical errors in the exception handling device (for example, a part slips while the robot is grabbing and moving the part). . Based on the premise that such physical errors always occur with a certain degree of probability, error handling, that is, an exception handling mechanism in device-embedded software is essential.

【0009】上述の特徴をもつ装置組み込み型ソフトウ
ェアの開発において最も困難なフェイズの1 つはテス
トとデバッグである。従来のテスト方式では、プログラ
ムを実機あるいはシミュレータ上で実行し、人間が用意
したテストデータあるいは計算機が自動的に生成したテ
ストデータに対してチェックを行っていた。
One of the most difficult phases in developing device-embedded software with the above characteristics is testing and debugging. In conventional testing methods, a program is executed on an actual machine or a simulator, and checked against test data prepared by a human or automatically generated by a computer.

【0010】0010

【発明が解決しようとする課題】しかしながら、一般に
複雑な並行処理プログラムの場合、様々な要因の組み合
わせによって起こる状況を全て想定することは人間にと
って大変困難な作業であり、テストデータによる方法に
は限界がある。つまり、実際の稼働時にはテストデータ
作成時には思いもよらなかった状況でバグが発生する可
能性が残る。このようなバグが、製品出荷後に発見され
た場合、大きな問題となる。また、並行処理プログラム
ではバグの発生に再現性がない。つまり、同じテストデ
ータでも偶然に左右されてバグが発生したりしなかった
りする。このような場合、デバッグ作業には必要以上に
時間と労力を要する。
[Problem to be solved by the invention] However, in general, in the case of complex parallel processing programs, it is a very difficult task for humans to imagine all the situations that will occur due to a combination of various factors, and there are limitations to methods using test data. There is. In other words, during actual operation, there is a possibility that bugs may occur in situations that were not anticipated when creating the test data. If such a bug is discovered after the product is shipped, it will be a big problem. Additionally, bugs cannot be reproduced in parallel processing programs. In other words, even with the same test data, bugs may or may not occur depending on chance. In such cases, debugging requires more time and effort than necessary.

【0011】本発明は、かかる従来の事情に対処してな
されたもので、個々のテストデータに対してプログラム
が正しく動くか否かをテストするのではなく、プログラ
ムの正しさを論理的に検証することができ、テストデー
タあるいは偶然性に依存せずに全ての場合においてプロ
グラムが正しく動くか否かを検証することのできるプロ
グラム検証装置を提供しようとするものである。
The present invention was made in response to such conventional circumstances, and instead of testing whether a program runs correctly on individual test data, it logically verifies the correctness of the program. The present invention aims to provide a program verification device that can verify whether a program operates correctly in all cases without relying on test data or chance.

【0012】[発明の構成][Configuration of the invention]

【0013】[0013]

【課題を解決するための手段】すなわち、本発明は、有
限の状態遷移グラフで表されたプログラムを入力するた
めの手段と、検証項目記述言語で記述された前記プログ
ラムの検証項目を入力するための手段と、前記状態遷移
グラフと前記検証項目とから、前記状態遷移グラフの状
態と前記検証項目との組で表されるノードと、このノー
ドのラベルである真偽値関数とを求め、依存グラフを生
成する手段と、前記ノードのうち、該ノードのみでは前
記真偽値関数の値を決定することのできない依存ノード
を、そのノードのみで前記真偽値関数の値を決定するこ
とのできる決定ノードに変換する手段と、前記真偽値関
数の値から前記プログラムが前記検証項目を満たしてい
るかどうかを判定する手段とを具備したことを特徴とす
る。
[Means for Solving the Problems] That is, the present invention provides a means for inputting a program expressed by a finite state transition graph, and a means for inputting verification items of the program written in a verification item description language. , the state transition graph, and the verification item, find a node represented by a pair of the state of the state transition graph and the verification item, and a truth value function that is the label of this node, and calculate the dependence. means for generating a graph; and a dependent node among the nodes that cannot determine the value of the truth value function by itself, the dependent node being capable of determining the value of the truth value function by that node alone. The present invention is characterized by comprising means for converting into a decision node, and means for determining whether the program satisfies the verification items based on the value of the truth value function.

【0014】[0014]

【作用】一般に、プログラムを論理的に検証することは
、現実問題として難しい、しかし、装置組み込み型ソフ
トウェアの場合、プログラムが有限状態遷移グラフで表
現できる場合が多い。そこで、本発明のプログラム検証
装置は、このような有限状態遷移グラフで表されたプロ
グラムの特性を論理的に検証することにより、テストデ
ータあるいは偶然性に依存せずに、全ての場合において
プログラムが正しく動くか否かを検証することのできる
ようにしたものである。
[Operation] In general, logically verifying a program is difficult as a practical matter, but in the case of device-embedded software, the program can often be expressed by a finite state transition graph. Therefore, the program verification device of the present invention logically verifies the characteristics of the program expressed by such a finite state transition graph, thereby ensuring that the program is correct in all cases without depending on test data or chance. This allows you to verify whether it works or not.

【0015】[0015]

【実施例】以下、本発明のプログラム検証装置の実施例
を、図面を参照して詳細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, embodiments of the program verification apparatus of the present invention will be described in detail with reference to the drawings.

【0016】図1は、本発明の一実施例のプログラム検
証装置の構成を示すものである。同図に示すように、本
実施例のプログラム検証装置は、有限状態遷移グラフ(
Finite Stata Transition G
raph 、以下FSTグラフと呼ぶ)と検証項目記述
言語で記述された検証項目(verifivcatio
n term、以下V項目と呼ぶ)を入力とし、FST
グラフがV項目を満たすかどうかの判定結果(YES/
NO)を出力とする装置であり、FSTグラフ読み込み
装置1と、V項目読み込み装置2と、V項目変換装置3
と、依存グラフ生成装置4と、依存グラフ簡単化装置5
と、判定装置6とから構成されている。
FIG. 1 shows the configuration of a program verification device according to an embodiment of the present invention. As shown in the figure, the program verification device of this embodiment uses a finite state transition graph (
Finite Stata Transition G
raph (hereinafter referred to as FST graph) and verification items (verifivcation) written in the verification item description language.
n term, hereinafter referred to as V item) as input, and FST
Judgment result of whether the graph satisfies item V (YES/
This is a device that outputs NO), and includes an FST graph reading device 1, a V item reading device 2, and a V item converting device 3.
, a dependency graph generation device 4, and a dependency graph simplification device 5
and a determination device 6.

【0017】上記構成のプログラム検証装置では、まず
、FSTグラフ読み込み装置1、V項目読み込み装置2
によって、それぞれFSTグラフとV項目を読み込む。 なお入出力の例を、図2に示す。同図において、10は
FSTグラフの入力の例を、11はV項目の入力の例を
示しており、12は出力である判定結果の例を示してい
る。
In the program verification device having the above configuration, first, an FST graph reading device 1 and a V item reading device 2 are used.
Read the FST graph and V item respectively. An example of input/output is shown in FIG. In the figure, 10 shows an example of input of the FST graph, 11 shows an example of input of V item, and 12 shows an example of the judgment result which is the output.

【0018】この後、V項目読み込み装置2によって読
み込まれたV項目は、V項目変換装置3によって、必要
最小限のオペレータで構成される式に変換される。なお
、V項目変換装置3における変換ルールを図3に示す。 また、検証項目記述言語の文法を図4に示す。なお、検
証項目は、状態論理式であり、状態論理式は状態論理式
とパス論理式から構成される。
Thereafter, the V item read by the V item reading device 2 is converted by the V item converting device 3 into a formula consisting of the minimum necessary number of operators. Note that the conversion rules in the V item conversion device 3 are shown in FIG. Furthermore, the grammar of the verification item description language is shown in FIG. Note that the verification item is a state logical formula, and the state logical formula is composed of a state logical formula and a path logical formula.

【0019】また、V項目変換装置3では、同時に、V
項目を構成する全ての部分検証項目(Element 
of Verification Term、以下EV
項目と呼ぶ)を抽出する。V項目の全ての部分状態論理
式を切り出して、ID番号つける。以下この番号で処理
を進める。
Furthermore, the V item conversion device 3 simultaneously converts V
All partial verification items (Element
of Verification Term, hereinafter referred to as EV
(referred to as items). Cut out all the partial state logical expressions of the V item and give them ID numbers. Proceed with the process using this number.

【0020】部分論理式の切り出しは、検証項目記述言
語の構文規則に基づいて自動的に検出できる。ただし、
冗長な部分論理式は削除する。また、mu(sv(Z)
,t(sv(Z))) はsv(Z) で表す。sv(
Z) はユニークであるような制限をつけているのでこ
れが可能である。例えば、mu(sv(z1),ep(
a  & @mu(sv(z2),ap(b #@sv
(z1)) & ep@sv(z2))))  のEV項目は、 ■  mu(sv(z1),ep(a  & @mu(
sv(z2),ap(b# @sv(z1)) & e
p@sv(z2))))  ■  ep(a  & @mu(sv(z2),ap(
b # @sv(z1)) & ep@sv(z2))
) ■  mu(sv(z2),ap(b # @sv(z
1)) & ep@sv(z2))■  ap(b #
 @sv(z1)) & ep@sv(z2) ■  
ap(b # @sv(z1)) ■  ep@sv(
z2)  の全6 種類である。しかしながら、ここで、冗長な論
理式を削除し、sv(z) で代表させる処理を行うと
、以下の4 つのEV項目が抽出できる。
Extraction of partial logical expressions can be automatically detected based on the syntax rules of the verification item description language. however,
Delete redundant sublogic expressions. Also, mu(sv(Z)
, t(sv(Z))) is expressed as sv(Z). sv(
This is possible because Z) is restricted to be unique. For example, mu(sv(z1),ep(
a & @mu(sv(z2), ap(b #@sv
The EV item of (z1)) & ep@sv(z2)))) is ■ mu(sv(z1),ep(a & @mu(
sv(z2), ap(b# @sv(z1)) & e
p@sv(z2)))) ■ ep(a & @mu(sv(z2), ap(
b # @sv(z1)) & ep@sv(z2))
) ■ mu(sv(z2), ap(b # @sv(z
1)) &ep@sv(z2))■ ap(b #
@sv(z1)) & ep@sv(z2) ■
ap(b # @sv(z1)) ■ ep@sv(
There are 6 types of z2). However, if redundant logical formulas are deleted and processing is performed to represent them with sv(z), the following four EV items can be extracted.

【0021】■  sv(z1) ■  sv(z2) ■  ap(b # @sv(z1)) ■  ep@
sv(z2)  ここで、各sv(z) の表しているmu式はデータベ
ースに登録されており、sv(z) の分解時には元の
mu式に対する分解を行う。
[0021] ■ sv (z1) ■ sv (z2) ■ ap (b # @sv (z1)) ■ ep@
sv(z2) Here, the mu expression represented by each sv(z) is registered in the database, and when sv(z) is decomposed, the original mu expression is decomposed.

【0022】次に、V項目変換装置3によって変換され
たV項目と、FSTグラフから、依存グラフ(depe
ndency graph、以下DGと呼ぶ)を依存グ
ラフ生成装置4によって生成する。DGの各ノードは、
FSTグラフの状態(s)とEV項目(t)の組(s,
t)で表される。 各ノードのラベルとして論理関数fが付属している。こ
れを、((s,t),f)と表す。fは、FSTグラフ
の状態(s)におけるEV項目(t)の真偽値を示して
いる。そのノードで真偽値が決定できる場合はf=1(
真)またはf=0(偽)である。すなわち、((s,t
),1)は「プログラムの状態がsのとき、検証項目t
は成り立つ」ということを表している。このように真偽
値関数の値が決定しているノードを決定ノードと呼ぶ。 一方、そのノードだけでは真偽値が決定できないノード
(以下、依存ノードと呼ぶ)に関しては、他のノードと
の論理的依存関係(dependency link 
、以下dリンク(dlink )と呼ぶ)を張る。これ
がDGのエッジとなる。具体的なエッジの形式は、 dlink((node0,f(x1,...,xn)
),[(node1,x1),...,(noden,
xn)]) . である。ここで、nodei=(si ,ei)であり
、nodeiの真偽値をxiとしたとき、node0 
の真偽値はf(x1,...,xn)で表される。この
dリンクは、node0 からnode1 、node
2 、…noden に対してn 本のエッジがあるこ
とを示している。
Next, a dependency graph (depe
(hereinafter referred to as DG) is generated by the dependency graph generation device 4. Each node of DG is
A set (s,
t). A logical function f is attached as a label to each node. This is expressed as ((s, t), f). f indicates the truth value of the EV item (t) in the state (s) of the FST graph. If the truth value can be determined at that node, f = 1 (
true) or f=0 (false). That is, ((s, t
), 1) is ``When the program state is s, the verification item t
It means that "is true." A node whose value of the truth value function is determined in this way is called a decision node. On the other hand, for nodes whose truth values cannot be determined by themselves (hereinafter referred to as dependent nodes), there is a logical dependency relationship with other nodes (dependency link
, hereinafter referred to as dlink). This becomes the edge of DG. The concrete edge format is dlink((node0,f(x1,...,xn)
), [(node1, x1), . .. .. , (noden,
xn)]). It is. Here, nodei=(si,ei), and when the truth value of nodei is xi, node0
The truth value of is expressed as f(x1,...,xn). This d-link goes from node0 to node1 to node
2, ...indicates that there are n edges for noden.

【0023】生成された依存グラフのすべてのノードが
決定ノードであれば、判定装置6で判定を行う。すなわ
ち、FSTグラフの初期状態s0とV項目式e0の組(
s0,e0)の真偽値が判定結果である。
If all nodes of the generated dependency graph are decision nodes, the decision device 6 makes a decision. That is, the set of the initial state s0 of the FST graph and the V item formula e0 (
The truth value of s0, e0) is the determination result.

【0024】また、依存ノードが存在する場合は依存グ
ラフ簡単化装置5で依存ノードを順次決定ノードに変換
し、最終的にすべての依存ノードを決定ノードにする。
Furthermore, if there are dependent nodes, the dependency graph simplification device 5 sequentially converts the dependent nodes into decision nodes, and finally all dependent nodes are made into decision nodes.

【0025】次に、上述した依存グラフの作成方法を説
明する。
Next, a method for creating the above-mentioned dependency graph will be explained.

【0026】まず、部分状態論理式のID番号とFST
 グラフTの各状態と論理関数の2−タプル((T の
状態,ID番号)をノードとするグラフ(依存グラフ)
DGを作成する。各ノードには1対1で論理関数が対応
づけられる。 この対応を(node,f)のように表し、データベー
スに登録される。この論理関数は、処理の過程で変化し
うる。ここで、((s ,t),f)においてf=1な
らばsにおいてtが真であり、f=0ならば偽であるこ
とを示す。真偽値の依存関係は、nodei(1 ≦i
 ≦n)の真偽値xiがnode0 の真偽値を決定す
る論理関数f(X1,…,xn) の論理変数xiに影
響(伝播)する。具体的論理関数は(s ,t)を分解
評価する過程で得られる。
First, the ID number of the partial state logic formula and the FST
A 2-tuple of each state of graph T and a logical function (a graph whose node is (state of T, ID number) (dependence graph)
Create DG. Each node is associated with a logical function on a one-to-one basis. This correspondence is expressed as (node, f) and registered in the database. This logical function may change during the process. Here, if f=1 in ((s, t), f), t is true in s, and if f=0, it is false. The dependence relationship of truth values is nodei (1 ≦i
The truth value xi of ≦n) influences (propagates) the logical variable xi of the logical function f(X1,...,xn) that determines the truth value of node0. A concrete logical function is obtained in the process of decomposing and evaluating (s, t).

【0027】実際は、DGを全てのノード(S,t)に
対して生成する必要はなく、(s0 ,t0) を起点
としてそこに連結しているエッジとノードだけを生成す
ればよい。ここで、s0はTの初期状態、t0は変換後
のV項目である。
In reality, it is not necessary to generate DG for all nodes (S, t), but only the edges and nodes connected to (s0, t0) starting from (s0, t0) need to be generated. Here, s0 is the initial state of T, and t0 is the V item after conversion.

【0028】なお、DGを生成するための分解評価ルー
ルを図5に示す。ここで、t は状態論理式、g はパ
ス論理式である。同図の111において、sは同じ状態
であることに注意する。112は、OR関係の論理式の
分解である。ここでもsは同じ状態である。113にお
いては、s1,s2 はパス論理式g1,g2 を満た
すようなTにおける次の状態である。また、114では
、s1はパス論理式gを満たすようなTにおける次の時
点の状態である。
Note that FIG. 5 shows the decomposition evaluation rule for generating DG. Here, t is a state formula and g is a path formula. Note that s is in the same state at 111 in the figure. 112 is a decomposition of a logical expression related to OR. Here, s is in the same state. 113, s1, s2 are the next states in T that satisfy the path formulas g1, g2. Also, at 114, s1 is the state at the next point in time in T that satisfies the path formula g.

【0029】次に、依存グラフの簡単化について説明す
る。
Next, simplification of the dependency graph will be explained.

【0030】まず、決定ノードを終点とするdリンクを
1 つ1 つ削除していく。すなわち、d1ink((
node0,f(x1,...,xn)), [(no
de1,x1),(node2,x2),...,(n
oden,xn)]) .において、nodei が決
定ノード(すなわち、assign(nodei,fi
)でfi=0かfi=1の場合)ならば、xi=fi 
としてfに代入し、この要素を削除する。つまり、d1
ink((node0,f(x1,...,xi−1,
xi+1,...,xn)), [(node1,x1
),...,(nodei−1,xi−1),(nod
ei+1,xi+1),...,(noden,xn)
]). となる。fを論理計算した結果0か1になったら、no
de0 は新しく決定ノードになる。このdリンクは不
必要なので削除する。計量的にはDGの各ノードを1 
回トレースするだけで簡単化は終了する。
First, d-links ending at the decision node are deleted one by one. That is, d1ink((
node0,f(x1,...,xn)), [(no
de1, x1), (node2, x2), . .. .. ,(n
oden, xn)]). , nodei is a decision node (i.e., assign(nodei, fi
) and if fi=0 or fi=1), then xi=fi
Assign it to f and delete this element. In other words, d1
ink((node0,f(x1,...,xi-1,
xi+1,. .. .. , xn)), [(node1, x1
),. .. .. , (nodei-1, xi-1), (nod
ei+1, xi+1), . .. .. , (noden, xn)
]). becomes. If the result of logical calculation of f is 0 or 1, no
de0 becomes the new decision node. This d-link is unnecessary, so delete it. Metrically, each node of DG is 1
The simplification is completed just by tracing once.

【0031】次に、簡単化された依存グラフに対して、
強連結成分を求める。このなかで閉成分を取り出し、成
分中のmu論理式は全て偽にする。すなわち、新しく決
定ノードが生成されるので、再度上記処理で簡単化し、
処理を繰り返す。最終的に、すべてのノードは決定ノー
ドになる。
Next, for the simplified dependency graph,
Find strongly connected components. A closed component is extracted from this, and all mu logical expressions in the component are made false. In other words, since a new decision node is generated, simplify it again by the above process,
Repeat the process. Eventually, all nodes become decision nodes.

【0032】次に、判定について説明する。((s0,
t0),f) は決定ノードであり、f が0 か1 
に決定できる。1ならば判定はYES(満たしている)
 であり、0 ならばNO(満たしていない)である。 ここで、s0はFST グラフの初期状態、t0は変換
後のV項目である。
Next, the determination will be explained. ((s0,
t0), f) are decision nodes, and whether f is 0 or 1
can be determined. If it is 1, the judgment is YES (satisfied)
If it is 0, it is NO (not satisfied). Here, s0 is the initial state of the FST graph, and t0 is the V item after conversion.

【0033】次に、図6および図7を参照して検証全体
の簡単な例を示す。図6はFSTグラフ読み込み装置1
から読み込まれるFSTグラフをであり、図7はV項目
読み込み装置2にから読み込まれるV項目である。この
V項目の意味は、「ある経路で、いつかはaを通過する
か?」である。この場合V項目tのEV項目は、t=m
u(sv(z),ep(a#@sv(z))) t ′
=ep(a#@sv(z)) の2 つであるが、tとt′は同一視できる。生成され
る依存グラフは次のようになる。
Next, a simple example of the overall verification will be shown with reference to FIGS. 6 and 7. Figure 6 shows FST graph reading device 1
7 shows the FST graph read from the V item reading device 2. FIG. The meaning of this item V is "Will a certain route pass through a someday?" In this case, the EV item of V item t is t=m
u(sv(z),ep(a#@sv(z))) t'
=ep(a#@sv(z)) However, t and t' can be regarded as the same. The generated dependency graph looks like this:

【0034】ノード: (s0,t),(s1,t),(s2,t),(s3,
t),(s4,t)ここで、(s3,t)だけが決定ノ
ードであり、((s3,t),1)である。したがって
、 エッジ: d1ink(((s0,t),x),[((s1,t)
,x)])。
Nodes: (s0, t), (s1, t), (s2, t), (s3,
t), (s4, t) where (s3, t) is the only decision node and is ((s3, t), 1). Therefore, Edge: d1ink(((s0,t),x),[((s1,t)
, x)]).

【0035】d1ink(((s1,t),x),[(
(s2,t),x),((s3,t),1)]) 。
d1ink(((s1, t), x), [(
(s2, t), x), ((s3, t), 1)]).

【0036】d1ink(((s2,t),x),[(
(s1,t),x)])となる。 このグラフの簡単化を行うと、最終的に((s0,t)
,1)になり、有限状態グラフが検証項目を満たすこと
が判定できる。
d1ink(((s2, t), x), [(
(s1, t), x)]). By simplifying this graph, we finally get ((s0, t)
, 1), and it can be determined that the finite state graph satisfies the verification items.

【0037】このように、本実施例によれば、有限状態
遷移グラフで表されるプログラムの様々な特性が検証で
きる。具体的に検証可能な項目としては、デッドロック
の検出、イベントの半順序関係の検証、相互排他の確認
、状態のオーバーラップ関係の確認等がある。テストデ
ータによるテストと異なり、あらゆる可能性を論理的に
検証できるので、高信頼性が確保できる。
As described above, according to this embodiment, various characteristics of a program expressed by a finite state transition graph can be verified. Specific items that can be verified include detection of deadlock, verification of partial order relationships of events, confirmation of mutual exclusion, and confirmation of overlapping relationships of states. Unlike testing using test data, all possibilities can be logically verified, ensuring high reliability.

【0038】[0038]

【発明の効果】以上説明したように、本発明のプログラ
ム検証装置によれば、個々のテストデータに対してプロ
グラムが正しく動くか否かをテストするのではなく、プ
ログラムの正しさを論理的に検証することができ、テス
トデータあるいは偶然性に依存せずに全ての場合におい
てプログラムが正しく動くか否かを検証することができ
る。
[Effects of the Invention] As explained above, according to the program verification device of the present invention, instead of testing whether a program runs correctly on individual test data, the correctness of the program is logically verified. It is possible to verify whether a program works correctly in all cases without relying on test data or chance.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】本発明の一実施例のプログラム検証装置の構成
を示す図。
FIG. 1 is a diagram showing the configuration of a program verification device according to an embodiment of the present invention.

【図2】本発明の一実施例における入出力の例を示す図
FIG. 2 is a diagram showing an example of input/output in an embodiment of the present invention.

【図3】V項目変換装置における変換ルールを示す図。FIG. 3 is a diagram showing conversion rules in the V item conversion device.

【図4】検証項目記述言語の文法を示す図。FIG. 4 is a diagram showing the grammar of the verification item description language.

【図5】論理関数fを決定する分解評価ルールを示す図
FIG. 5 is a diagram showing a decomposition evaluation rule for determining a logical function f.

【図6】検証例におけるFSTグラフを示す図。FIG. 6 is a diagram showing an FST graph in a verification example.

【図7】検証例におけるV項目を示す図。FIG. 7 is a diagram showing V items in a verification example.

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

1  FSTグラフ読み込み装置 2  V項目読み込み装置 3  V項目変換装置 4  依存グラフ生成装置 5  依存グラフ簡単化装置 6  判定装置 1 FST graph reading device 2 V item reading device 3 V item conversion device 4 Dependency graph generation device 5 Dependency graph simplifier 6 Judgment device

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  有限の状態遷移グラフで表されたプロ
グラムを入力するための手段と、検証項目記述言語で記
述された前記プログラムの検証項目を入力するための手
段と、前記状態遷移グラフと前記検証項目とから、前記
状態遷移グラフの状態と前記検証項目との組で表される
ノードと、このノードのラベルである真偽値関数とを求
め、依存グラフを生成する手段と、前記ノードのうち、
該ノードのみでは前記真偽値関数の値を決定することの
できない依存ノードを、そのノードのみで前記真偽値関
数の値を決定することのできる決定ノードに変換する手
段と、前記真偽値関数の値から前記プログラムが前記検
証項目を満たしているかどうかを判定する手段とを具備
したことを特徴とするプログラム検証装置。
1. Means for inputting a program expressed by a finite state transition graph; means for inputting verification items of the program written in a verification item description language; means for generating a dependency graph by determining a node represented by a pair of the state of the state transition graph and the verification item and a truth value function that is a label of this node from the verification item; home,
means for converting a dependent node that cannot determine the value of the truth value function by the node alone into a decision node that can determine the value of the truth value function by the node alone, and the truth value A program verification device comprising means for determining whether the program satisfies the verification items based on the value of the function.
JP3031164A 1991-02-27 1991-02-27 Program verifying device Withdrawn JPH04271439A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3031164A JPH04271439A (en) 1991-02-27 1991-02-27 Program verifying device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3031164A JPH04271439A (en) 1991-02-27 1991-02-27 Program verifying device

Publications (1)

Publication Number Publication Date
JPH04271439A true JPH04271439A (en) 1992-09-28

Family

ID=12323800

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3031164A Withdrawn JPH04271439A (en) 1991-02-27 1991-02-27 Program verifying device

Country Status (1)

Country Link
JP (1) JPH04271439A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0778075A (en) * 1993-01-22 1995-03-20 Internatl Business Mach Corp <Ibm> Method and apparatus for provision of interactive dispersed finite-state program generator

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0778075A (en) * 1993-01-22 1995-03-20 Internatl Business Mach Corp <Ibm> Method and apparatus for provision of interactive dispersed finite-state program generator

Similar Documents

Publication Publication Date Title
KR100237090B1 (en) Centralized control system
Tasiran et al. Coverage metrics for functional validation of hardware designs
Cengic et al. On formal analysis of IEC 61499 applications, part B: Execution semantics
Balasubramaniyan et al. Design and verification of Cyber-Physical Systems using TrueTime, evolutionary optimization and UPPAAL
US20020013680A1 (en) Method and configuration for comparing a first characteristic with predetermined characteristics of a technical system
Hartonas-Garmhausen et al. ProbVerus: Probabilistic symbolic model checking
Cimatti et al. Model checking safety critical software with SPIN: an application to a railway interlocking system
US20220137586A1 (en) Method, computer program and apparatus for analysing a programmable logic controller program
Johnson et al. Cyber-physical specification mismatch identification with dynamic analysis
Sadri‐Moshkenani et al. Survey on test case generation, selection and prioritization for cyber‐physical systems
Sims et al. Automated validation of software models
CN112463133B (en) Coq-based verification method for time sequence safety of robot control system
CN110119358B (en) Test method and device for FBD (film bulk digital) program
Ausberger et al. Model checking application on function block diagram model
Elmqvist et al. Safety-oriented design of component assemblies using safety interfaces
JPH04271439A (en) Program verifying device
CN112632890B (en) Verification of hardware design for data transformation component
Clarke Automatic verification of finite-state concurrent systems
Wahba et al. Connection error location and correction in combinational circuits
Menzies et al. How many tests are enough
Zhang et al. Specifying and verifying PLC systems with TLA+: A case study
Vaandrager Does it Pay Off? Model-Based Verification and Validation of Embedded Systems!
Vizovitin et al. Application of colored Petri nets for verification of scenario control structures in UCM notation
Meenakshi Formal verification
Israr et al. Reliable system design using decision diagrams in presence of hard and soft errors

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19980514