# A Transformation-Based Approach to Implication of GSTE Assertion Graphs

Authors: Guowu Yang; William N. N. Hung; Xiaoyu Song; Wensheng Guo
Journal: Journal of Applied Mathematics
 (2013)

---

## Abstract

Generalized symbolic trajectory evaluation (GSTE) is a model checking approach and has successfully demonstrated
its powerful capacity in formal verification of VLSI systems. GSTE is an extension of symbolic trajectory evaluation (STE) to the model checking ofω-regular properties. It is an alternative to classical model checking algorithms where properties are specified as finite-state automata. In GSTE, properties are specified as assertion graphs, which are labeled directed graphs where each edge is labeled with two labeling functions: antecedent and consequent. In this paper, we show the complement relation between GSTE assertion graphs and finite-state automata with the expressiveness of regular languages and ω-regular languages. We present an algorithm that transforms a GSTE assertion graph to a finite-state automaton and vice versa. By applying this algorithm, we transform the problem of GSTE assertion graphs implication to the problem of automata language containment. We demonstrate our approach with its application to verification of an FIFO circuit.


---

## Body

## 1. Introduction

Generalized symbolic trajectory evaluation (GSTE) [1–4] is a model checking approach which was originally developed at Intel and has successfully demonstrated its powerful capacity in formal verification of VLSI systems [1–7]. GSTE is extended from the lattice-based symbolic trajectory evaluation (STE)  [8, 9] which can handle large industrial designs  [10–13]. The STE theory consists of a simple specification language, a simulation-based model checking algorithm, and a powerful quaternary abstraction algorithm. Though STE is very efficient in automatic verification of large-scale industrial hardware designs at both gate and transistor levels, it has a limited specification language which only allows the specification of properties over finite time intervals.In GSTE, allω-regular properties can be expressed and verified with space and time efficiencies comparable with STE. Assertion graphs are introduced in GSTE as an extension of STE specification language and are the key to the usability of GSTE. An assertion graph is a labeled directed graph where each edge is labeled with two labeling functions: antecedent and consequent [3]. The existing GSTE theory provides an efficient model checking procedure for verifying that a circuit obeys an assertion graph as well as techniques based on abstract interpretation to combat state space explosion [3, 7].How to establish that one specification implies another is a fundamental problem in formal verification. Hu et al. [6, 7] proposed some algorithms to decide whether one assertion graph implies another through building monitor circuits. Yang and Seger [2] verified assertion graphs through manually refining assertion graphs. Yang et al. [14] gave some conditions under which the assertion graphs implication is decided without reachability analysis if two assertion graphs have the same graph structure. Sebastiani et al. [15] gave the complement relation between an assertion graph and a finite-state automaton. An assertion graph with n states resulted in a nondeterministic automaton with 3*n states.In this paper, we consider both finite-state automata that accept regular languages and finite-stateω-automata with Büchi acceptance conditions that accept ω-regular languages. For a finite-state automaton over finite words, acceptance is defined according to the last state visited by a run of the automaton; while for a finite-state automaton with Büchi acceptance conditions, there is no such “the last state” and acceptance is defined according to the set of states that a run visits infinitely often [16].We present a theory on the complement relation between GSTE assertion graphs and finite-state automata and an algorithm which automatically transforms assertion graphs to their equivalent finite-state automata, and vice versa. For an assertion graphG, we construct a corresponding finite-state automaton MG such that L*(G)=Σ*-L*(MG) and Lω(G)=Σω-Lω(MG), the number of states in MG is only twice as many as that in G, and a deterministic assertion graph is transformed to a deterministic automaton. On the other hand, for an arbitrary finite-state automaton M, we construct a corresponding assertion graph GM such that L*(GM)=Σ*-L*(M) and Lω(GM)=Σω-Lω(M), the number of states in GM is the same as that in M, and a deterministic automaton is transformed to a deterministic assertion graph.We apply the proposed theory and algorithm to the GSTE assertion graphs implication problem by transforming this problem to the automata language containment problem. Since, in many cases, assertion graphs are nondeterministic, their corresponding finite-state automata are also nondeterministic. This may cause exponential state space blowups in checking automata language containment [16–22]. We avoid such blowups in determining the implication relation between a nondeterministic assertion graph and its refinement derived following the refinement strategies given in [2], by transforming the implication relation between nondeterministic assertion graphs to the implication relation between deterministic assertion graphs without adding any states. This application is illustrated with a case study for verifying correctness properties of an FIFO circuit.The remainder of this paper is organized as follows. In Section2, we introduce the preliminaries of finite-state automata and GSTE assertion graphs. In Section 3, we present the transformation algorithm and prove its correctness. In Section 4, we propose an application of the transformation algorithm to determine the implication relation between GSTE assertion graphs and demonstrate its effectiveness with a case study. We conclude in Section 5.


## 2. Preliminaries

In this section, we give the definitions of finite-state automata and GSTE assertion graphs and of their finite and infinite languages. We also show that the fairness edge constraints for GSTE assertion graphs [1] are equivalent to the fairness state constraints.Definition 1.
A finite-state automatonM is a tuple M=〈Q,Σ,E,LF,q0,F〉, where Q is a finite set of states, Σ is a finite alphabet, E is a set of directed edges over Q, LF:E↦2Σ is the labeling function for all edges, q0∈Q is the initial state, and F is a subset of Q whose elements are called acceptance states.Definition 2.
A finite word (or string)X=x1x2⋯xn∈Σ* is accepted by a finite-state automaton M (denoted as X⊨*M) if there exists a path ρ=q0q1⋯qn such that (qi-1,qi)∈E, qn∈F, and xi∈LF((qi-1,qi)), denoted as X⊨LFρ.Definition 3.
An infinite word (or string)X=x1x2⋯∈Σω is accepted by a finite-state automaton M (denoted as X⊨ωM) if there exists an infinite path ρ=q0q1⋯ such that (qi-1,qi)∈E, Inf(ρ)∩F≠∅, where Inf(ρ) is the set of states occurring infinitely often in ρ, and xi∈LF((qi-1,qi)), denoted as X⊨LFρ.Definition 4.
The finite languageL*(M) of M is L*(M)={X∈Σ*∣X⊨*M}. The infinite language Lω(M) of M is Lω(M)={X∈Σω∣X⊨ωM}.Definition 5.
Given a finite-state automatonM=〈Q,Σ,E,LF,q0,F〉, In(q) and Out(q) for q∈Q are called the set of incoming edges of q and the set of outgoing edges of q, respectively; that is, In(q)={(q′,q)∣(q′,q)∈E} and Out(q)={(q,q′)∣(q,q′)∈E}.Definition 6.
If for allq∈Q and for all e,e′∈Out(q), e≠e′ and LF(e)∩LF(e′)=∅, M is called a deterministic finite-state automaton (DFA). Otherwise, M is called a nondeterministic finite-state automaton (NFA).
Traditionally, an NFA may have a set of initial states. The expressiveness of an NFA with multiple initial states is the same as that of an NFA with a unique initial state. The transformation is easy.Definition 7.
An assertion graphG is a tuple 〈Q,Σ,E,q0,ant,cons,F〉, where Q is a finite set of states, Σ is a finite alphabet, E is a set of directed edges over Q, ant:E↦2Σ and cons:E↦2Σ are the labeling functions for all edges, q0∈Q is the initial state, and F is a subset of Q and elements of F are called acceptance states.Definition 8.
A finite word (or string)X=x1x2⋯xn∈Σ* is accepted by an assertion graph G (denoted as X⊨*G) if for each finite path ρ=q0q1⋯qn with (qi-1,qi)∈E (where 1≤i≤n) and qn∈F such that X⊨antρ⇒X⊨consρ, where X⊨antρ denotes xi∈ant((qi-1,qi)) and X⊨consρ denotes xi∈cons((qi-1,qi)) for 1≤i≤n. An infinite word (or string) X=x1x2⋯∈Σω is accepted by G (denoted as X⊨ωG) if for all infinite path ρ=q0q1⋯ with (qi-1,qi)∈E (where i≥1) and Inf(ρ)∩F≠∅ such that X⊨antρ⇒X⊨consρ. The finite language L*(G) of G is L*(G)={X∈Σ*∣X⊨*G}. The infinite language Lω(G) of G is Lω(G)={X∈Σω∣X⊨ωG}.Remark 9.
In [1], an assertion graph G=〈Q,Σ,E,q0,ant,cons,Fe〉 has a set Fe of acceptance (fair) edges. The final edge of a finite path must be in Fe and for an infinite path; at least one edge in Fe must appear in the path infinitely often. This can be transformed to the above definitions by the following construction. For any q∈Q, if the incoming edges In(q) have both acceptance edges and nonacceptance edges, q is substituted with q′ and q′′ such that In(q′)=In(q)∩Fe, In(q′′)=In(q)-In(q′); that is, the incoming edges of q′ are all acceptance edges, the incoming edges of q′′ are nonacceptance edges (See Figure 1). The outgoing edges of q′ and q′′ are the same as the outgoing edges of q, and the labeling function ant and cons are the same. All such q′s are included the acceptance state set F in the transformed assertion graph.Figure 1
Fair edges to fair states.Definition 10.
Given an assertion graphG=〈Q,Σ,E,q0,ant,cons,F〉, if for allq∈Q, for alle,e′∈Out(q) and e≠e′, ant(e)∩ant(e′)=∅, G is called a deterministic assertion graph (DAG). Otherwise, G is called a nondeterministic assertion graph (NAG).For any assertion graphG=〈Q,Σ,E,q0,ant,cons,F〉, we can assume that G is a nonrestarting assertion graph (i.e., In(q0)=∅); otherwise, we construct a nonrestarting assertion graph G′=〈Q′,Σ,E′,q0,ant,cons,F′〉 from G: Q′=Q∪{q′} (add a new state q′ to Q), In(q′)={(q,q′)∣(q,q0)∈E)},Out(q′)={(q′,q)∣(q0,q)∈E)}, ant((q′,q))=ant((q0,q)),cons((q′,q))=cons((q0,q)), ant((q,q′))=ant((q,q0)),cons((q,q′))=cons((q,q0)). Basically, we copy the edges and the related labeling functions ant and cons of q0 to q′ and delete the incoming edges of q0. The other edges and labeling functions remain the same.


## 3. Transformations between GSTE Assertion Graphs and Finite-State Automata

In this section, we present the transformations between a GSTE assertion graph and a finite-state automaton. Given an assertion graphG, we build a finite-state automaton MG such that L*(G)=Σ*-L*(MG) and Lω(G)=Σω-Lω(MG). And if G is a deterministic assertion graph, then MG is also a deterministic finite-state automaton. Let MG=〈Q′,Σ,E′,LF,q0′,F′〉:(1)
Q′=(Q-{q0})×{0,1}∪{(q0,0)}, q0′=(q0,0);(2)
E′={((q1,k1),(q2,k2))∣(q1,q2)∈E;ifk1=0,thenk2∈{0,1};ifk1=1,thenk2=1} (See Figure 2);(3)
LF((q1,0),(q2,0))=ant((q1,q2))∩cons((q1,q2)), LF((q1,0),(q2,1))=ant((q1,q2))∩¬cons((q1,q2)), LF((q1,1),(q2,1))=ant((q1,q2));(4)
F′={(q,1)∣q∈F}.Figure 2
Assertion graph to finite-state automaton.Intuitively,MG is constructed to accept all strings (or words) that are not accepted by G. Such a string (or word) satisfies the antecedent of each edge traversed while violating the consequent of at least of such edge.Theorem 11.
IfG is a DAG, then MG is a DFA.Proof.
We prove the following two cases.
(i) For any state(q,1) in MG and any two outgoing edges ((q,1),(q1,1)) and ((q,1),(q2,1)), LF(((q,1),(q1,1)))∩LF(((q,1),(q2,1)))=ant((q,q1))∩ant((q,q2)) (the construction of MG) =∅ (the definition of DAG).
(ii) For any state(q,0) in MG and any two outgoing edges ((q,0),(q1,k1)) and ((q,0),(q2,k2)).  (a)
Ifq1=q2, then k1=0,k2=1, LF(((q,0),(q1,0)))∩LF(((q,0),(q1,1)))=ant((q,q1))∩cons((q,q1))∩ant((q,q1))∩¬cons((q,q1))  (the construction of MG) =∅.(b)
Ifq1≠q2, then LF(((q,1),(q1,1)))∩LF(((q,1),(q2,1)))⊆ant((q,q1))∩ant((q,q2))    (the construction of MG) =∅ (the definition of DAG).  Therefore, MG is a DFA.Theorem 12.
L
*
(
M
G
)
=
Σ
*
-
L
*
(
G
).Proof.
First, we showL*(MG)⊇Σ*-L*(G).
SupposeX=x1x2⋯xn∈Σ*-L*(G).
Then there exists a finite pathρ=q0q1⋯qn in G with (qi-1,qi)∈E,1≤i≤n and qn∈F such that xi∈ant((qi-1,qi)) for 1≤i≤n; and ∃l,1≤l≤n, when 1≤h<l, xh∈ant((qi-1,qi))∩cons((qi-1,qi)), xl∈ant((ql-1,ql))∩¬cons((qi-1,qi)).
Let a pathρ′ of MG be as follows:
(1)ρ′=(q0,0)(q1,0)⋯(ql-0,0)(ql,1)⋯(qn,1).
Thenxi∈LF((qi-1,ki-1),(qi,ki)), where ki=0 if 1≤i<l, ki=1 if l≤i≤n; and (qn,1)∈F′.
Therefore,X∈L*(MG).
Second, we showL*(MG)⊆Σ*-L*(G).
SupposeX=x1x2⋯xn∈L*(MG).
Then there exists a path as follows:(2)ρ′=(q0,0)(q1,0)⋯(ql-0,0)(ql,1)⋯(qn,1),
such that xi∈LF((qi-1,ki-1),(qi,ki)), where ki=0 if 1≤i<l, ki=1 if l≤i≤n; and (qn,1)∈F′.
According to the construction ofMG from G, we know that ρ=q0q1⋯qn is a path of G; if1≤i<l, xi∈LF((qi-1,ki-1),(qi,ki))=LF((qi-1,0),(qi,0))=ant((qi-1,qi))∩cons((qi-1,qi))⊆ant((qi-1,qi)).
x
l
∈
L
F
(
(
q
l
-
1
,
0
)
,
(
q
l
,
1
)
)
=
ant
(
(
q
l
-
1
,
q
l
)
)
∩
¬
cons
(
(
q
l
-
1
,
q
l
)
), that is, xl∈ant((ql-1,ql)), but xl∉cons((ql-1,ql)).
Ifl<i≤n, xi∈LF((qi-1,ki-1),(qi,ki))=LF((qi-1,1),(qi,1))=ant((qi-1,qi)).
Therefore,X∉L*(G).Theorem 13.
L
ω
(
M
G
)
=
Σ
ω
-
L
ω
(
G
).Proof.
First, we proveLω(MG)⊇Σω-Lω(G).
SupposeX=x1x2⋯∈Σω-Lω(G).
Then there exists an infinite pathρ=q0q1⋯ in G with (qi-1,qi)∈E and Inf(ρ)∩F≠∅ such that xi∈ant((qi-1,qi)) for 1≤i; and ∃l,1≤l, xl∉cons((ql-1,ql)). Let a path ρ′ of MG be ρ′=(q0,0)(q1,0)⋯(ql-1,0)(ql,1)(ql+1,1)⋯. This path ρ′ will visit infinitely often every (q,1)∈F′ if q∈Inf(ρ)∩F. And xi∈LF((qi-1,ki-1),(qi,ki)), where ki-1=0 if 1≤i≤l, ki=1 if l<i.
ThusX∈Lω(MG).
Second, we proveLω(MG)⊆Σω-Lω(G).
SupposeX=x1x2⋯∈Lω(MG).
Then there exists an infinite pathρ′=(q0,0)(q1,0)⋯(ql-1,0)(ql,1)(ql+1,1)⋯ in MG with (qi-1,qi)∈E and Inf(ρ′)∩F′≠∅ such that xi∈LF((qi-1,ki-1),(qi,ki)), where ki=0 if 1≤i<l, ki=1 if l≤i≤n.
According to the construction ofMG from G, we know that ρ=q0q1⋯ is a path of G, and Inf(ρ)∩F≠∅; xi∈ant((qi-1,qi)) for 1≤i, and xl∈ant((ql-1,ql))∩¬cons((ql-1,ql)), that is, xl∉cons((ql-1,ql)).
Therefore,X⊭ωG, that is, X∈Σω-Lω(G).Given a finite-state automatonM=〈Q,Σ,E,LF,q0,F〉, build an assertion graph GM as GM=〈Q,Σ,E,q0,ant,cons,F〉 where ant(e)=LF(e), cons(e)=∅ for all e∈E. This construction is the same as the construction proposed in [15].Theorem 14.
L
*
(
G
M
)
=
Σ
*
-
L
*
(
M
) and Lω(GM)=Σω-Lω(M).Proof.
Directly from the construction ofGM and the language definitions in [15].Theorem 15.
IfM is a DFA, then GM is a DAG.Proof .
Directly from the construction ofGM and the deterministic definition.


## 4. Application to GSTE Assertion Graphs Implication

### 4.1. Transforming GSTE Assertion Graphs Implication to Automata Language Containment

The complement relation between an assertion graph and a finite-state automaton can be applied to determine the implication relation between assertion graphs by transforming the GSTE assertion graphs implication to the finite-state automata language containment.Definition 16.
Given two assertion graphsG1 and G2, G1⇒*G2 if and only if L*(G1)⊆L*(G2) and G1⇒ωG2 if and only if Lω(G1)⊆Lω(G2).LetM*c be an automaton whose finite language is the complement of the finite language of an automaton M; that is, L*(M*c)=Σ*-L*(M). Let Mωc be an automaton whose infinite language is the complement of the infinite language of an automaton M; that is, Lω(Mωc)=Σω-Lω(M).Theorem 17.
G
1
⇒
*
G
2 iff L*((MG1)*c×MG2)=∅.
G
1
⇒
ω
G
2 iff Lω((MG1)ωc×MG2)=∅.Proof.
(
G
1
⇒
*
G
2
)
⇔
L
*
(
G
1
)
⊆
L
*
(
G
2
)
⇔
L
*
(
M
G
1
)
⊇
L
*
(
M
G
2
)
⇔
L
*
(
(
M
G
1
)
*
c
×
M
G
2
)
=
∅.
(
G
1
⇒
ω
G
2
)
⇔
L
ω
(
G
1
)
⊆
L
ω
(
G
2
)
⇔
L
ω
(
M
G
1
)
⊇
L
ω
(
M
G
2
)
⇔
L
ω
(
(
M
G
1
)
ω
c
×
M
G
2
)
=
∅.In GSTE, because of its aggressive abstraction, abstraction refinement is often necessary [2]. Verifying whether a circuit C satisfies an assertion graph G, C⊨G, using the GSTE engine may produce false negative if G is too abstract. Thus, it is necessary to refine G into a refined assertion graph Gref. If we can verify C⊨Gref, then we can conclude C⊨G. But how can we guarantee that (C⊨Gref)⇒(C⊨G) if the assertion graph is complex? We must establish Gref⇒G. We can verify Gref⇒G by transforming it to an automata language containment test using Theorem 17.A critical difficulty in checking the language containment,L(M1)⊆L(M2), is the construction of a complement finite-state automaton M2c of M2. Complementing a nondeterministic automaton with n states resulted in an automaton with 22O(n) [23]. Some optimized complementing constructions were introduced with 2O(nlogn) [16–22]. However, the complexity is still exponential.Although we can transform deterministic assertion graphs to deterministic finite-state automata, in many cases, assertion graphs are nondeterministic. This may cause state space blowups when checking language containment between automata corresponding to these assertion graphs. We observe that in determining the implication relation between an assertion graph and its refinements constructed using the refinement strategies in [2], we can transform the nondeterministic assertion graph G to deterministic assertion graph Gdet by adding only one variable without adding any states and then apply the refinements to Gdet. The requirement of our method is that the refinements applied to Gdet will not cause nondeterminism. The refinement strategies in [2] satisfy our requirement. The language containment of deterministic finite state automata can be checked in polynomial time [19]. Therefore, the state space blowup problem can be avoided in determining the implication relation between a refined assertion graph and an original assertion graph.For any given assertion graphG=〈Q,Σ,E,q0,ant,cons,F〉, let Gref be a refined assertion graph of G. If G is a non-deterministic assertion graph, we add an additional variable “det” to constrain the overlapped antecedents of the outgoing edges of every state in G and the resulting assertion graph is denoted as Gdet; that is, Gdet=〈Q,Σ×det,E,q0,ant×det,cons×det,F〉. The value domain of “det” is from 1 to the maximal number n that we need to distinguish the overlapped antecedents of the outgoing edges of every state in the assertion graph G, denoted as D(det).Figure3 illustrates the determinization process: there are three outgoing edges from state p: (p,q1),(p,q2), and (p,q3). Two of these three antecedents ant((p,q2))={3,4} and ant((p,q3))={3,5} in Figure 3(a) are overlapped. So, it is a non-deterministic transition. We constrain these two antecedents by adding a variable “det” with a domain of  {1,2} and changing ant((p,q2)) to {3,4}×{det=1} and ant((p,q3)) to {3,5}×{det=2} in Figure 3(b), the determinized assertion graph Gdet. For simplification, the consequents and the antecedents which are not needed to be constrained will not be followed by ×det.Figure 3
Assertion graph determinization.The projection of the (finite or infinite) language ofGdet is defined as Lproj*(Gdet)={x1x2⋯xn∈Σ*∣∃di∈D(det),s.t.(x1,d1)(x2,d2)⋯(xn,dn)∈L*(Gdet)}, Lprojω(Gdet)={x1x2⋯∈Σω∣∃di∈D(det),s.t.(x1,d1)(x2,d2)⋯∈Lω(Gdet)}.Lemma 18.
L
*
(
G
)
=
L
p
r
o
j
*
(
G
d
e
t
), Lω(G)=Lprojω(Gdet).Proof.
First, supposeX=x1x2⋯xn∈L*(G). For any finite path ρ=q0q1⋯qn in Gdet, it is also a path in G according to the construction of Gdet (because it does not change the graph structure of the assertion graph G). If X⊨antρ, that is, xi∈ant((qi-1,qi)) for 1≤i≤n, then X⊨consρ, namely, xi∈cons((qi-1,qi)) for 1≤i≤n. According to the definition of Gdet, there exists di∈D(det) such that ant((qi-1,qi))×di is the antecedent of the edge (qi-1,qi) in Gdet if there is a constraint det=di for this antecedent, or a subset of the antecedent of the edge (qi-1,qi) in Gdet if there is no constraint for this antecedent. Therefore, Xdet=(x1,d1)(x2,d2)⋯(xn,dn)⊨ant×detρ, and Xdet⊨cons×detρ because there is no constraint for the consequents. Thus, Xdet∈L*(Gdet). According to the definition of the projection language of Gdet, X∈Lproj*(Gdet).
Second, suppose thatX=x1x2⋯xn∈Lproj*(Gdet). Then there exists di∈D(det) such that Xdet=(x1,d1)(x2,d2)⋯(xn,dn)∈L*(Gdet), which implies that if (xi,di)∈ant((qi-1,qi))×di for 1≤i≤n, then (xi,di)∈cons((qi-1,qi))×det. And (xi,di)∈ant((qi-1,qi))×di implies xi∈ant((qi-1,qi)), (xi,di)∈cons((qi-1,qi))×det implies xi∈cons((qi-1,qi)).
ThereforeX∈L*(G).
Combining these two cases, we haveL*(G)=Lproj*(Gdet).
Similarly,Lω(G)=Lprojω(Gdet) is also true.Theorem 19.
(
G
d
e
t
r
e
f
⇒
G
d
e
t
)
⇒
(
G
r
e
f
⇒
G
).Proof.
(
G
det
ref
⇒
G
det
)
⇔
(
L
(
G
det
ref
)
⊆
L
(
G
det
)
) (definition of implication).
⇒
(
L
proj
(
G
det
ref
)
⊆
L
proj
(
G
det
)
) (definition of projection language).
⇒
(
L
(
G
ref
)
⊆
L
(
G
)
) (Lemma 18).
⇒
(
G
ref
⇒
G
) (definition of implication).In the above proof, the languageL(G) can be finite language L*(G) or infinite language Lω(G). Thus, Theorem 19 holds for both finite and infinite languages, respectively.


### 4.2. Case Study

An FIFO is a common circuit within a microprocessor design. The design requirements of an FIFO can be fairly complex due to the variable lengths, different rates of data throughput, and timing. Therefore, it makes a good practice to verify the FIFO design against these requirements. In general, the behavior of an FIFO must meet the following requirements: (1) correctness of full and empty flags, and (2) enqueued data must be dequeued in the correct order while maintaining uncorrupted data. The FIFO has 0 entry after the reset. If an enqueue only operation occurred, the total number of entries increases by 1. On the other hand, if a dequeue only operation occurred, the total number of entries decreases by 1 when the number of entries is bigger than 0. The empty flag is set when the number of entries is 0 and the full flag is set when contents reach the depth of the FIFO.An assertion graph of a 3-deep FIFO circuit is shown in Figure4 without determinization variable det.Figure 4
Determinized assertion graph for FIFO.The top part of the assertion graph specifies the number of filled entries. However, it cannot guarantee whether the enqueued data is corrupted or not. In order to overcome this situation, an enqueued vector of distinct symbolic constants is used at an arbitrary time as shown in the bottom portion of the graph.The assertion graph shown in Figure4 without determinization variable det has the potential problem of overapproximation. In order to overcome this problem, a refined assertion graph shown in Figure 5 without determinization variable det is introduced.Figure 5
Determinized and refined assertion graph for FIFO.It unfolds the graph at the states where the precision is lost.Using the GSTE engine, we can verify the refined assertion graph on the FIFO circuit. To conclude that the original assertion graph also holds on the circuit, we must establish that the refined assertion graph implies the original assertion graph. Since both assertion graphs are non-deterministic, we first determinize the original assertion graph. A variable “det” whose domain is {1,2} is added to determinize the original assertion graph. We add “det=1” in the antecedents on the edges (i-filled, (i+1)-filled) and “det=2” in the antecedents on the edges (i-filled, i-ahead), respectively, for i=0,1,2. And We add “det=1” in the antecedents on the edges (i-filled, i-filled) and “det=2” in the antecedents on the edges (i-filled, (i-1)-ahead), respectively, for i=1,2. The determinized assertion graph is shown in Figure 4. We then refine the assertion graph in Figure 4 by applying the same refinements that refine the original assertion graph to the refined assertion graph and get the determinized and refined assertion graph shown in Figure 5.We select COSPAN [24, 25] as the model checking engine to perform language containment test. We code the automata corresponding to the assertion graphs in Figures 4 and 5 in S/R, the input language of COSPAN, and use COSPAN to verify that the language of the automaton corresponding to the assertion graph in Figure 4 is contained in the language of the assertion graph in Figure 5. COSPAN establishes the language containment using 0.156 megabytes memory and 0.02 CPU seconds on a Pentium IV 2.8 GHz computer.


## 4.1. Transforming GSTE Assertion Graphs Implication to Automata Language Containment

The complement relation between an assertion graph and a finite-state automaton can be applied to determine the implication relation between assertion graphs by transforming the GSTE assertion graphs implication to the finite-state automata language containment.Definition 16.
Given two assertion graphsG1 and G2, G1⇒*G2 if and only if L*(G1)⊆L*(G2) and G1⇒ωG2 if and only if Lω(G1)⊆Lω(G2).LetM*c be an automaton whose finite language is the complement of the finite language of an automaton M; that is, L*(M*c)=Σ*-L*(M). Let Mωc be an automaton whose infinite language is the complement of the infinite language of an automaton M; that is, Lω(Mωc)=Σω-Lω(M).Theorem 17.
G
1
⇒
*
G
2 iff L*((MG1)*c×MG2)=∅.
G
1
⇒
ω
G
2 iff Lω((MG1)ωc×MG2)=∅.Proof.
(
G
1
⇒
*
G
2
)
⇔
L
*
(
G
1
)
⊆
L
*
(
G
2
)
⇔
L
*
(
M
G
1
)
⊇
L
*
(
M
G
2
)
⇔
L
*
(
(
M
G
1
)
*
c
×
M
G
2
)
=
∅.
(
G
1
⇒
ω
G
2
)
⇔
L
ω
(
G
1
)
⊆
L
ω
(
G
2
)
⇔
L
ω
(
M
G
1
)
⊇
L
ω
(
M
G
2
)
⇔
L
ω
(
(
M
G
1
)
ω
c
×
M
G
2
)
=
∅.In GSTE, because of its aggressive abstraction, abstraction refinement is often necessary [2]. Verifying whether a circuit C satisfies an assertion graph G, C⊨G, using the GSTE engine may produce false negative if G is too abstract. Thus, it is necessary to refine G into a refined assertion graph Gref. If we can verify C⊨Gref, then we can conclude C⊨G. But how can we guarantee that (C⊨Gref)⇒(C⊨G) if the assertion graph is complex? We must establish Gref⇒G. We can verify Gref⇒G by transforming it to an automata language containment test using Theorem 17.A critical difficulty in checking the language containment,L(M1)⊆L(M2), is the construction of a complement finite-state automaton M2c of M2. Complementing a nondeterministic automaton with n states resulted in an automaton with 22O(n) [23]. Some optimized complementing constructions were introduced with 2O(nlogn) [16–22]. However, the complexity is still exponential.Although we can transform deterministic assertion graphs to deterministic finite-state automata, in many cases, assertion graphs are nondeterministic. This may cause state space blowups when checking language containment between automata corresponding to these assertion graphs. We observe that in determining the implication relation between an assertion graph and its refinements constructed using the refinement strategies in [2], we can transform the nondeterministic assertion graph G to deterministic assertion graph Gdet by adding only one variable without adding any states and then apply the refinements to Gdet. The requirement of our method is that the refinements applied to Gdet will not cause nondeterminism. The refinement strategies in [2] satisfy our requirement. The language containment of deterministic finite state automata can be checked in polynomial time [19]. Therefore, the state space blowup problem can be avoided in determining the implication relation between a refined assertion graph and an original assertion graph.For any given assertion graphG=〈Q,Σ,E,q0,ant,cons,F〉, let Gref be a refined assertion graph of G. If G is a non-deterministic assertion graph, we add an additional variable “det” to constrain the overlapped antecedents of the outgoing edges of every state in G and the resulting assertion graph is denoted as Gdet; that is, Gdet=〈Q,Σ×det,E,q0,ant×det,cons×det,F〉. The value domain of “det” is from 1 to the maximal number n that we need to distinguish the overlapped antecedents of the outgoing edges of every state in the assertion graph G, denoted as D(det).Figure3 illustrates the determinization process: there are three outgoing edges from state p: (p,q1),(p,q2), and (p,q3). Two of these three antecedents ant((p,q2))={3,4} and ant((p,q3))={3,5} in Figure 3(a) are overlapped. So, it is a non-deterministic transition. We constrain these two antecedents by adding a variable “det” with a domain of  {1,2} and changing ant((p,q2)) to {3,4}×{det=1} and ant((p,q3)) to {3,5}×{det=2} in Figure 3(b), the determinized assertion graph Gdet. For simplification, the consequents and the antecedents which are not needed to be constrained will not be followed by ×det.Figure 3
Assertion graph determinization.The projection of the (finite or infinite) language ofGdet is defined as Lproj*(Gdet)={x1x2⋯xn∈Σ*∣∃di∈D(det),s.t.(x1,d1)(x2,d2)⋯(xn,dn)∈L*(Gdet)}, Lprojω(Gdet)={x1x2⋯∈Σω∣∃di∈D(det),s.t.(x1,d1)(x2,d2)⋯∈Lω(Gdet)}.Lemma 18.
L
*
(
G
)
=
L
p
r
o
j
*
(
G
d
e
t
), Lω(G)=Lprojω(Gdet).Proof.
First, supposeX=x1x2⋯xn∈L*(G). For any finite path ρ=q0q1⋯qn in Gdet, it is also a path in G according to the construction of Gdet (because it does not change the graph structure of the assertion graph G). If X⊨antρ, that is, xi∈ant((qi-1,qi)) for 1≤i≤n, then X⊨consρ, namely, xi∈cons((qi-1,qi)) for 1≤i≤n. According to the definition of Gdet, there exists di∈D(det) such that ant((qi-1,qi))×di is the antecedent of the edge (qi-1,qi) in Gdet if there is a constraint det=di for this antecedent, or a subset of the antecedent of the edge (qi-1,qi) in Gdet if there is no constraint for this antecedent. Therefore, Xdet=(x1,d1)(x2,d2)⋯(xn,dn)⊨ant×detρ, and Xdet⊨cons×detρ because there is no constraint for the consequents. Thus, Xdet∈L*(Gdet). According to the definition of the projection language of Gdet, X∈Lproj*(Gdet).
Second, suppose thatX=x1x2⋯xn∈Lproj*(Gdet). Then there exists di∈D(det) such that Xdet=(x1,d1)(x2,d2)⋯(xn,dn)∈L*(Gdet), which implies that if (xi,di)∈ant((qi-1,qi))×di for 1≤i≤n, then (xi,di)∈cons((qi-1,qi))×det. And (xi,di)∈ant((qi-1,qi))×di implies xi∈ant((qi-1,qi)), (xi,di)∈cons((qi-1,qi))×det implies xi∈cons((qi-1,qi)).
ThereforeX∈L*(G).
Combining these two cases, we haveL*(G)=Lproj*(Gdet).
Similarly,Lω(G)=Lprojω(Gdet) is also true.Theorem 19.
(
G
d
e
t
r
e
f
⇒
G
d
e
t
)
⇒
(
G
r
e
f
⇒
G
).Proof.
(
G
det
ref
⇒
G
det
)
⇔
(
L
(
G
det
ref
)
⊆
L
(
G
det
)
) (definition of implication).
⇒
(
L
proj
(
G
det
ref
)
⊆
L
proj
(
G
det
)
) (definition of projection language).
⇒
(
L
(
G
ref
)
⊆
L
(
G
)
) (Lemma 18).
⇒
(
G
ref
⇒
G
) (definition of implication).In the above proof, the languageL(G) can be finite language L*(G) or infinite language Lω(G). Thus, Theorem 19 holds for both finite and infinite languages, respectively.


## 4.2. Case Study

An FIFO is a common circuit within a microprocessor design. The design requirements of an FIFO can be fairly complex due to the variable lengths, different rates of data throughput, and timing. Therefore, it makes a good practice to verify the FIFO design against these requirements. In general, the behavior of an FIFO must meet the following requirements: (1) correctness of full and empty flags, and (2) enqueued data must be dequeued in the correct order while maintaining uncorrupted data. The FIFO has 0 entry after the reset. If an enqueue only operation occurred, the total number of entries increases by 1. On the other hand, if a dequeue only operation occurred, the total number of entries decreases by 1 when the number of entries is bigger than 0. The empty flag is set when the number of entries is 0 and the full flag is set when contents reach the depth of the FIFO.An assertion graph of a 3-deep FIFO circuit is shown in Figure4 without determinization variable det.Figure 4
Determinized assertion graph for FIFO.The top part of the assertion graph specifies the number of filled entries. However, it cannot guarantee whether the enqueued data is corrupted or not. In order to overcome this situation, an enqueued vector of distinct symbolic constants is used at an arbitrary time as shown in the bottom portion of the graph.The assertion graph shown in Figure4 without determinization variable det has the potential problem of overapproximation. In order to overcome this problem, a refined assertion graph shown in Figure 5 without determinization variable det is introduced.Figure 5
Determinized and refined assertion graph for FIFO.It unfolds the graph at the states where the precision is lost.Using the GSTE engine, we can verify the refined assertion graph on the FIFO circuit. To conclude that the original assertion graph also holds on the circuit, we must establish that the refined assertion graph implies the original assertion graph. Since both assertion graphs are non-deterministic, we first determinize the original assertion graph. A variable “det” whose domain is {1,2} is added to determinize the original assertion graph. We add “det=1” in the antecedents on the edges (i-filled, (i+1)-filled) and “det=2” in the antecedents on the edges (i-filled, i-ahead), respectively, for i=0,1,2. And We add “det=1” in the antecedents on the edges (i-filled, i-filled) and “det=2” in the antecedents on the edges (i-filled, (i-1)-ahead), respectively, for i=1,2. The determinized assertion graph is shown in Figure 4. We then refine the assertion graph in Figure 4 by applying the same refinements that refine the original assertion graph to the refined assertion graph and get the determinized and refined assertion graph shown in Figure 5.We select COSPAN [24, 25] as the model checking engine to perform language containment test. We code the automata corresponding to the assertion graphs in Figures 4 and 5 in S/R, the input language of COSPAN, and use COSPAN to verify that the language of the automaton corresponding to the assertion graph in Figure 4 is contained in the language of the assertion graph in Figure 5. COSPAN establishes the language containment using 0.156 megabytes memory and 0.02 CPU seconds on a Pentium IV 2.8 GHz computer.


## 5. Conclusion

In this paper, we have established the complement relation between GSTE assertion graphs and finite-state automata with expressiveness of regular languages andω-regular languages. We present an algorithm that transforms a GSTE assertion graph to a finite-state automaton and vice versa. Using this algorithm, we transform the problem of GSTE assertion graphs implication to the problem of automata language containment. We avoid the exponential state space blowups in checking language containment of non-deterministic finite-state automata when determining the implication relation between a nondeterministic assertion graph and its refinement derived following the refinement strategies given in [2]. This avoidance is achieved by transforming the implication relation between nondeterministic assertion graphs to the implication relation between deterministic assertion graphs without adding any states. This application has been illustrated with a case study for verifying properties of an FIFO circuit.



---

*Source: 709071-2013-07-10.xml*