1 | The model-checking technique we propose is based on the Counterexample-guided |
---|
2 | Abstraction Refinement (CEGAR) methodology \cite{clarke00cegar}. The overall |
---|
3 | description of our methodology is shown in figure \ref{cegar}. |
---|
4 | We take into account the structure of the system as a set of synchronous components, |
---|
5 | each of which has been previously verified and a set of CTL properties is attached to each component. This set refers to the specification of the component. We would like to verify whether a concrete model, $M$ presumedly huge sized and composed of several components, satisfies a global ACTL property $\Phi$. Due to state space combinatorial explosion phenomenon that occurs when verifying huge and complex systems, an abstraction or approximation of the concrete model has to be done in order to be able to verify the system with model-checking techniques. Instead of building the product of the concrete components, we replace each concrete component by an abstraction of its behavior derived from a subset of the CTL properties it satisfies. Each abstract component represents an over-approximation of the set of behaviors of its related concrete component \cite{braunstein07ctl_abstraction}. |
---|
6 | |
---|
7 | %\subsection{Overall Description of our methodology} |
---|
8 | In CEGAR loop methodology, in order to verify a global property $\Phi$ on a |
---|
9 | concrete model $M$, an abstraction of the concrete model $\widehat{M}$ is |
---|
10 | generated and tested in the model-checker. As the abstract model is an |
---|
11 | over-approximation of the concrete model and the global property $\Phi$ is in the ACTL fragment, if $\Phi$ holds on the the abstract model then it holds in the concrete model as well \cite{clarke94model}. However, if $\Phi$ does not hold in the abstract model then one cannot conclude anything regarding the concrete model until the counterexample, $\sigma$, given by the model-checker has been analyzed. |
---|
12 | In this last case, the test of spurious counter-example is translated into a |
---|
13 | SAT problem as in \cite{clarke00cegar}. When a counterexample is proven to be spurious, the refinement phase occurs, injecting more preciseness into the (abstract) model to be analyzed. |
---|
14 | |
---|
15 | %\bigskip |
---|
16 | %\begin{definition} |
---|
17 | %The property to be verified, $\Phi$ is an ACTL formula. ACTL formulas |
---|
18 | %are CTL formulas with only universal path quantifiers: AX, AF, AG and AU. |
---|
19 | %\end{definition} |
---|
20 | |
---|
21 | %\begin{definition} |
---|
22 | %Given $\widehat{M} = (\widehat{AP}, \widehat{S}, \widehat{S}_0, \widehat{L}, \widehat{R}, \widehat{F})$ an abstract model of a concrete model, $M$ and $\Phi$, a global property to be verified on $M$, the model-checking result can be interpreted as follows: |
---|
23 | % |
---|
24 | %\begin{itemize} |
---|
25 | %\item{$\widehat{M} \vDash \Phi \Rightarrow M \vDash \Phi$ : verification completed } |
---|
26 | %\item{$\widehat{M} \nvDash \Phi$ and $\exists \sigma$ : counterexample analysis required in order to determine whether $M \nvDash \Phi$ or $\widehat{M}$ is too coarse. } |
---|
27 | %\end{itemize} |
---|
28 | %\end{definition} |
---|
29 | |
---|
30 | %\bigskip |
---|
31 | %We can conclude that the property $\Phi$ doesn't hold in the concrete model $M$ if the counterexample path is possible in M. Otherwise the abstract model at step $i : \widehat{M}_i$, has to be refined if $\widehat{M}_i \nvDash \Phi$ and the counterexample obtained during model-checking was proven to be \emph{spurious}. |
---|
32 | |
---|
33 | \begin{figure}[h!] |
---|
34 | % \centering |
---|
35 | % \includegraphics[width=1.2\textwidth]{our_CEGAR_Loop_Enhanced_2S_PNG} |
---|
36 | % \hspace*{-5mm} |
---|
37 | \includegraphics{our_CEGAR_Loop_Enhanced_2S_PNG} |
---|
38 | \caption{\label{cegar} Verification Process } |
---|
39 | \end{figure} |
---|
40 | |
---|
41 | \subsection{Concrete system definition} |
---|
42 | As mention earlier, in our verification methodology, we have a concrete model which consists of several components and each component comes with its specification or more precisely, properties that hold in the component. Given a global property $\Phi$, the property to be verified by the composition of the concrete components model, an abstract model is generated by selecting some of the properties of the components which are relevant to $\Phi$. |
---|
43 | |
---|
44 | |
---|
45 | The concrete system is a synchronous composition of components, each of which |
---|
46 | described as a Moore machine. |
---|
47 | \begin{definition} |
---|
48 | A \emph{Moore machine} $C$ is defined by a tuple $\langle I, O, R,$ $\delta, \lambda, \mathbf{R}_0 \rangle$, where, |
---|
49 | \begin{itemize} |
---|
50 | \item $I$ is a finite set of boolean inputs signals. |
---|
51 | \item $O$ is a finite set of boolean outputs signals. |
---|
52 | \item $R$ is a finite set of boolean sequential elements (registers). |
---|
53 | \item $\delta : 2^I \times 2^R \rightarrow 2^R$ is the transition function. |
---|
54 | \item $\lambda : 2^R \rightarrow 2^O$ is the output function. |
---|
55 | \item $\mathbf{R}_0 \subseteq 2^R$ is the set of initial states. |
---|
56 | \end{itemize} |
---|
57 | \end{definition} |
---|
58 | |
---|
59 | \emph{States} (or configurations) of the circuit correspond to boolean configurations of all the sequential elements. |
---|
60 | |
---|
61 | \begin{definition} |
---|
62 | A \emph{Concrete system} $M$ is obtained by synchronous composition of the |
---|
63 | component.\\ |
---|
64 | $M = C_1 \parallel C_2 \parallel \ldots \parallel C_n$,where each $C_i$ is a |
---|
65 | Moore machine with a specification associated $\varphi_i = \{\varphi_i^1 \ldots |
---|
66 | \varphi_i^k\}$ Each $\varphi_i^j$ is a CTL$\setminus$X formula whose |
---|
67 | propositions $AP$ belong to $\{I_i\cup O_i\cup R_i\}$ . |
---|
68 | \end{definition} |
---|
69 | |
---|
70 | \subsection{Abstraction definition} |
---|
71 | |
---|
72 | Our abstraction consists in reducing the size of the representation model by |
---|
73 | letting free some of its variables. The point is to determine the good set of variable |
---|
74 | to be freed and when to free them. We take advantage of the CTL specification |
---|
75 | of each component: a CTL property may be seen as a partial view of the tree of |
---|
76 | behaviors of its variables. All the variables not specified by the property |
---|
77 | can be freed. We introduced the Abstract Kripke Structure (AKS for short) which exactly |
---|
78 | specifies when the variable of the property can be freed. |
---|
79 | The abstraction of a component is represented by an AKS, |
---|
80 | derived from a subset of the CTL properties the component satisfies. |
---|
81 | Roughly speaking, AKS($\varphi$), the AKS derived from a CTL property |
---|
82 | $\varphi$, simulates all execution trees whose initial state satisfies |
---|
83 | $\varphi$. In AKS($\varphi$), states are tagged with the truth values of |
---|
84 | $\varphi$'s atomic propositions, among the four truth values of Belnap's logic \cite{belnap77}: inconsistent ($\bot$), |
---|
85 | false ($\mathbf{f}$), true ($\mathbf{t}$) and unknown ($\top$)). |
---|
86 | States with inconsistent truth values are not represented since they refer to non possible |
---|
87 | assignments of the atomic propositions. A set of fairness constraints eliminates non-progress cycles. |
---|
88 | |
---|
89 | |
---|
90 | %Assume that we have an abstract Kripke structure (AKS) representing the abstract model $\widehat{M}$ of the concrete model of the system M with regard to the property to be verified, $\Phi$. The abstraction method is based on the work described in \cite{ braunstein07ctl_abstraction}. |
---|
91 | |
---|
92 | \begin{definition}{\label{def-aks}} |
---|
93 | Given a CTL$\setminus$X property $\varphi$ whose set of atomic propositions is |
---|
94 | $AP$, An \emph{Abstract Kripke Structure}, $AKS(\varphi) =(AP, \widehat{S}, \widehat{S}_0, \widehat{L}, \widehat{R}, \widehat{F})$ is a 6-tuple consisting of: |
---|
95 | |
---|
96 | \begin{itemize} |
---|
97 | \item { $AP$ : The finite set of atomic propositions of property $\varphi$ } |
---|
98 | \item { $\widehat{S}$ : a finite set of states} |
---|
99 | \item { $\widehat{S}_0 \subseteq \widehat{S}$ : a set of initial states} |
---|
100 | \item { $\widehat{L} : \widehat{S} \rightarrow \cal{B}^{\mid AP \mid}$ with $\cal{B} = \{\bot, \mathbf{f}, \mathbf{t},\top\}$: a labeling function which labels each state with configuration of current value of each atomic proposition.} |
---|
101 | \item { $\widehat{R} \subseteq \widehat{S} \times \widehat{S}$ : a transition relation where $ \forall s \in \widehat{S}, \exists s' \in \widehat{S}$ such that $(s,s') \in \widehat{R}$ } |
---|
102 | \item { $\widehat{F}$ : a set of fairness constraints (generalized B\"uchi |
---|
103 | acceptance condition)} |
---|
104 | \end{itemize} |
---|
105 | \end{definition} |
---|
106 | %\bigskip |
---|
107 | |
---|
108 | We denote by $\widehat{L}(s)$ the configuration of atomic propositions in state $s$ and by $\widehat{L}(s)[p]$ the projection of configuration $\widehat{L}(s)$ according to atomic proposition $p$. |
---|
109 | |
---|
110 | |
---|
111 | As the abstract model $\widehat{M}$ is generated from the conjunction of verified properties of the components in the concrete model $M$, it can be seen as the composition of the AKS of each property. |
---|
112 | The AKS composition has been defined in \cite{braunstein_phd07}; it extends |
---|
113 | the classical synchronous composition of Moore machine to deal with |
---|
114 | four-valued variables. |
---|
115 | %\bigskip |
---|
116 | |
---|
117 | \begin{definition} An \emph{Abstract model} $\widehat{M}$ is obtained by |
---|
118 | synchronous composition of components abstractions. Let $n$ be the number of components in the model and $m$ be the number of selected verified properties of a component; |
---|
119 | let $C_j$ be a component of the concrete model $M$ and $\varphi_{j}^k$ is a CTL formula describing a satisfied property of component $C_j$. Let $AKS (\varphi_{C_j^k})$ the AKS generated from $\varphi_j^k$. We have $\forall j \in [1,n]$ and $\forall k \in [1,m]$: |
---|
120 | |
---|
121 | \begin{itemize} |
---|
122 | \item{$ \widehat{C}_j = AKS (\varphi_{C_j^1}) ~||~ AKS (\varphi_{C_j^2} ) ~||~...~||~ AKS (\varphi_{C_j^k}) ~||$\\ $ ...~||~ AKS (\varphi_{C_j^m}) $} |
---|
123 | \item{$ \widehat{M} = \widehat{C}_1 ~||~ \widehat{C}_2 ~||~ ... ~||~ \widehat{C}_j ~||~... ~||~ \widehat{C}_n $} |
---|
124 | \end{itemize} |
---|
125 | |
---|
126 | \end{definition} |
---|
127 | |
---|
128 | |
---|
129 | The generation of an abstract model in the form of AKS from CTL formulas is described in \cite{braunstein07ctl_abstraction} and has been implemented (\cite{bara08abs_composant}). |
---|
130 | |
---|
131 | |
---|
132 | %\subsection{Characterization of AKS} |
---|
133 | |
---|
134 | In an abstract Kripke structure a state where a variable $p$ is {\it unknown} |
---|
135 | can simulate all states in which $p$ is either true or false. It |
---|
136 | is a concise representation of the set of more concrete states in which $p$ |
---|
137 | is either true or false. A state $s$ is said to be an \emph{abstract state} |
---|
138 | if one its variable $p$ is {\it unknown}. |
---|
139 | |
---|
140 | %\begin{definition} |
---|
141 | %A state $s$ is an {\emph abstract state} if one its variable $p$ is {\it unknown}. |
---|
142 | %\end{definition} |
---|
143 | |
---|
144 | \begin{definition}[] |
---|
145 | The \emph {concretization} of an abstract state $s$ with respect to the variable $p$ |
---|
146 | ({\it unknown} in that state), assigns either true or false to $p$. |
---|
147 | |
---|
148 | The \emph {abstraction} of a state $s$ with respect to the variable $p$ |
---|
149 | (either true or false in that state), assigns {\it unknown} to $p$. |
---|
150 | \end{definition} |
---|
151 | |
---|
152 | \begin{property}[Concretization] |
---|
153 | Let $A_i$ and $A_j$ two abstractions such that $A_j$ is obtained by |
---|
154 | concretizing one abstract variable of $A_i$ (resp $A_i$ is obtained by |
---|
155 | abstracting one variable in $A_j$). Then $A_i$ simulates $A_j$, denoted by |
---|
156 | $A_i \sqsubseteq A_j$. |
---|
157 | \end{property} |
---|
158 | \begin{proof} |
---|
159 | As the concretization of state reduces the set of concrete configuration the |
---|
160 | abstract state represents but does not affect the transition relation of the |
---|
161 | AKS. The unroll execution tree of $A_j$ is a subtree of the one of $A_i$. Then $A_i$ simulates $A_j$. |
---|
162 | \end{proof} |
---|
163 | |
---|
164 | \begin{property}[Compostion and Concretization] |
---|
165 | \label{prop:concrete_compose} |
---|
166 | Let $\widehat{M_i}$ be an abstract model of $M$ and $\varphi_j^k$ be a property |
---|
167 | of a component $C_j$ of M, $\widehat{M}_{i+1} = \widehat{M_i}\parallel |
---|
168 | AKS(\varphi_j^k) $ is simulated by $ \widehat{M_i}$, $\widehat{M_i} |
---|
169 | \sqsubseteq \widehat{M}_{i+1}$. |
---|
170 | \end{property} |
---|
171 | |
---|
172 | \begin{proof} |
---|
173 | By the property of the parallel composition, we have directly $\widehat{M_i} |
---|
174 | \sqsubseteq \widehat{M}_{i} \parallel AKS(\varphi_j^k$. |
---|
175 | \end{proof} |
---|
176 | |
---|
177 | \subsection{Initial abstraction} |
---|
178 | We suppose that our concrete model is a composition of several components and |
---|
179 | each component has been previously verified. Hence, we have a set of verified |
---|
180 | properties for each component of the concrete model. The main idea of this |
---|
181 | technique is that we would like to make use of these properties to generate a |
---|
182 | better abstract model. Properties of the components that appear to be related |
---|
183 | to the global property to be verified, $\Phi$ are selected to generate the |
---|
184 | abstract model $\widehat{M}_i$. This method is particularly interesting as it |
---|
185 | gives a possibility to converge quicker to an abstract model that is |
---|
186 | sufficient to satisfy the global property $\Phi$. |
---|
187 | In the following, we will name primary variables the set of variable that |
---|
188 | appears in the global property. |
---|
189 | |
---|
190 | In the initial abstraction generation, all primary variables have to be |
---|
191 | represented. Therefore the properties in the specification of each component |
---|
192 | where the primary variables are present will be used to generate the initial |
---|
193 | abstraction, $\widehat{M}_0$ and we will verify the satisfiability of the |
---|
194 | global property $\Phi$ on this abstract model. If the model-checking failed and the counterexample given is found to be spurious, we will then proceed with the refinement process. |
---|
195 | |
---|
196 | |
---|