source: papers/FDL2012/abstraction_refinement.tex @ 52

Last change on this file since 52 was 52, checked in by cecile, 12 years ago

Decomposition de papier en fichier

File size: 13.4 KB
Line 
1\subsection{Generalities}
2
3We suppose that our concrete model is a composition of several components and each component has been previously verified. Hence, we have a set of verified properties for each component of the concrete model. The main idea of this technique is that we would like to make use of these properties to generate a better abstract model. Properties of the components that appear to be related to the global property to be verified, $\phi$ are selected to generate the abstract model $\widehat{M}_i$. This method is particularly interesting as it gives a possibility to converge quicker to an abstract model that is sufficient to satisfy the global property $\phi$.
4
5\subsubsection{Refinement}
6The model-checker provides a counterexample when a property failed during model-checking. The counterexample can be \emph{spurious} which means that the path is impossible in the concrete model $M$ or the counterexample is real which implies that $M \nvDash \phi $.When a counterexample is found to be spurious, it means that the current abstract model $\widehat{M}_i$ is too coarse and has to be refined. In this section, we will discuss about the refinement technique based on the integration of more verified properties of the concrete model's components in the abstract model to be generated. Moreover, the refinement step from $\widehat{M}_i$ to $\widehat{M}_{i+1}$ has to be conservative and respects the properties below:
7
8%\medskip
9
10\begin{property}
11All $\widehat{M}_i$ generated are upper-approximations of $M$. Furthermore, we guarantee that $\widehat{M}_{i+1} \sqsubseteq \widehat{M}_i$.
12\end{property}
13%\bigskip
14\begin{property}
15$\sigma_i$ is a counterexample of $\widehat{M}_i$ and $\sigma_i$ is not a counterexample of $\widehat{M}_{i+1}$.
16\end{property}
17
18%\bigskip
19%\newpage
20
21\subsubsection{The Counterexample}
22
23
24The counterexample at a refinement step $i$, $\sigma_i$ is a path in the abstract model $\widehat{M}_i$ which dissatisfy $\phi$.  In the counterexample given by the model-checker, the variables' value in each states are boolean.
25%\medskip
26
27\begin{definition}
28\textbf{\emph{The counterexample $\sigma_i$ :}} \\
29\\
30Let $\widehat{M}_i =(\widehat{AP}_i, \widehat{S}_i, \widehat{S}_{0i}, \widehat{L}_i, \widehat{R}_i, \widehat{F}_i)$ and let the length of the counterexample, $|\sigma_i| = n$: $ \sigma_i = \langle s_{\bar{a}i,0}, s_{\bar{a}i,1}, s_{\bar{a}i,2}, ... , s_{\bar{a}i,k},$ $s_{\bar{a}i,k+1}, ... , s_{\bar{a}i,n}\rangle $ with $ \forall k \in [0,n-1], ~s_{\bar{a}i,k} \subseteq s_{i,k}  \in \widehat{S}_i, ~s_{\bar{a}i,0} \subseteq s_{i,0} \in \widehat{S}_{0i}$ and $(s_{i,k}, s_{i,k+1}) \in \widehat{R}_i$. \\
31Furthermore, for each state in $\sigma_i$ we have $s_{\bar{a}i,k} = \langle v_{\bar{a}i,k}^1, v_{\bar{a}i,k}^2, ... ,  v_{\bar{a}i,k}^p, ... , v_{\bar{a}i,k}^q \rangle$, $\forall p \in [1,q], ~v_{\bar{a}i,k}^p \in \widehat{V}_{i,k}$ with $\widehat{V}_{i,k} \in 2^q$. \\
32\\
33(\emph{\underline{Note} :} In AKS $\widehat{M}_i$, the variables are actually 3-valued : $\widehat{V}_{i,k} \in 3^q$. We differenciate the 3-valued variables  $v_{i,k}^p$ from boolean variables with $v_{\bar{a}i,k}^p$.)\\
34
35%\medskip
36
37\end{definition}
38
39%\bigskip
40
41\begin{definition}
42\textbf{\emph{Spurious counterexample :}} \\
43\\
44Let $\sigma_c = \langle s_{c,0}, s_{c,1}, s_{c,2}, ... , s_{c,k}, s_{c,k+1}, ... , s_{c,n}\rangle$ a path of length $n$ in the concrete model $M$ and in each state of $\sigma_c$ we have $s_{c,k} = \langle v_{c,k}^1, v_{c,k}^2, ... ,  v_{c,k}^{p'}, ... , v_{c,k}^{q'} \rangle$ with $\forall p' \in [1,q'], ~v_{i,k}^{p'} \in V_{c,k}$ and $V_{c,k} \in 2^{q'}$.\\
45
46\smallskip
47
48If $\forall k$ we have $\widehat{V}_{i,k} \subseteq V_{c,k}$ and $\forall v_{\bar{a}i,k} \in \widehat{V}_{i,k}, ~s_{i,k}|_{v_{\bar{a}i,k}} = s_{c,k}|_{v_{c,k}} $ then $M \nvDash \phi$ else $\sigma_i$ is \emph{spurious}.
49
50\end{definition}
51
52
53
54\subsection{Pre-processing and pertinency ordering of properties}
55
56Before generating an abstract model to verify a global property $\phi$, the verified properties of all the components in the concrete model are ordered according to their pertinency in comparison to a global property $\phi$. In order to do so, the variable dependency of the variables present in global property $\phi$ has to be analysed. After this point, we refer to the variables present in the global property $\phi$ as \emph{primary variables}.
57
58%\bigskip
59
60The ordering of the properties will be based on the variable dependency graph.
61The variables in the model are weighted according to their dependency level
62\emph{vis-à-vis} primary variables and the properties will be weighted according to the sum of the weights of the variables present in it. We have decided to allocate a supplementary weight for variables which are present at the interface of a component whereas variables which do not interfere in the obtention of a primary variable will be weighted 0. Here is how we proceed:
63
64
65\begin{enumerate}
66
67\item {\emph{Establishment of primary variables' dependency and maximum graph depth}\\
68Each primary variable will be examined and their dependency graph is elobarated. The maximum graph depth among the primary variable dependency graphs will be identified and used to calibrate the weight of all the variables related to the global property.
69Given the primary variables of $\phi$, $V_{\phi} =  \langle v_{\phi_0}, v_{\phi_1}, ... , v_{\phi_k}, ... , v_{\phi_n} \rangle$ and $G{\_v_{\phi_k}}$ the dependency graph of primary variable $v_{\phi_k}$, we have the maximum graph depth $max_{d} = max(depth(Gv_{\phi_0}), depth(Gv_{\phi_1}), ... , depth(Gv_{\phi_k}), ... ,$\\$ depth(Gv_{\phi_n})) $.
70
71}
72
73\item {\emph{Weight allocation for each variables} \\
74Let's suppose $max_d$ is the maximum dependency graph depth calculated and $p$ is the unit weight. We allocate the variable weight as follows:
75\begin{itemize}
76\item{All the variables at degree $max_d$ of every dependency graph will be allocated the weight of $p$.}
77 \\ \hspace*{20mm} $Wv_{max_d} = p$
78\item{All the variables at degree $max_d - 1$ of every dependency graph will be allocated the weight of $2Wv_{max_d}$.}
79\\ \hspace*{20mm} $Wv_{max_d - 1} = 2Wv_{max_d}$
80\item{...}
81\item{All the variables at degree $1$ of every dependency graph will be allocated the weight of $2Wv_{2}$.}
82 \\ \hspace*{20mm} $Wv_{1} = 2Wv_{2}$
83\item{All the variables at degree $0$ (i.e. the primary variables) will be allocated the weight of $10Wv_{1}$.}
84 \\ \hspace*{20mm} $Wv_{0} = 10Wv_{1}$
85\end{itemize}
86
87We can see here that the primary variables are given a considerable
88ponderation due to their pertinency \emph{vis-à-vis} global  property. Furthermore, we will allocate a supplementary weight of $3Wv_{1}$ to variables at the interface of a component as they are the variables which assure the connection between the components if there is at least one variable in the dependency graph established in the previous step in the property. All other non-related variables have a weight equals to $0$.
89}
90
91
92\item {\emph{Ordering of the properties} \\
93Properties will be ordered according to the sum of the weight of the variables in it. Therefore, given a property $\varphi_i$ which contains $n+1$ variables, $V_{\varphi_i} =  \langle v_{\varphi_{i0}}, v_{\varphi_{i1}}, ... , v_{\varphi_{ik}}, ... , v_{\varphi_{in}} \rangle$, the weight  of $\varphi_i$ , $W_{\varphi_i} = \sum_{k=0}^{n} Wv_{\varphi_{ik}}$ .
94After this stage, we will check all the properties with weight $>0$ and allocate a supplementary weight of $3Wv_{1}$ for every variable at the interface present in the propery. After this process, the final weight of a property is obtained and the properties will be ordered in a list with the weight  decreasing (the heaviest first). We will refer to the ordered list of properties related to the global property $\phi$ as $L_\phi$.
95
96
97}
98
99\end{enumerate}
100
101%\bigskip
102
103\emph{\underline{Example:}}  \\
104
105For example, if a global property $\phi$ consists of 3 variables: $ p, q, r $ where:
106\begin{itemize}
107\item{$p$ is dependent of $a$ and $b$}
108\item{$b$ is dependent of $c$}
109\item{$q$ is dependent of $x$}
110\item{$r$ is independent}
111\end{itemize}
112
113Example with unit weight= 50.
114The primary variables: $p$, $q$ and $r$ are weighted $100x10=1000$ each. \\
115The secondary level variables : $a$, $b$ and $x$ are weighted $50x2=100$ each. \\
116The tertiary level variable $c$ is weighted $50$. \\
117The weight of a non-related variable is $0$.
118
119So each verified properties available pertinency will be evaluated by adding the weights of all the variables in it. It is definitely not an exact pertinency calculation of properties but provides a good indicator of their possible impact on the global property.
120
121\bigskip
122\begin{figure}[h!]
123   \centering
124%   \includegraphics[width=1.2\textwidth]{Dependency_graph_weight_PNG}
125%     \hspace*{-15mm}
126     \includegraphics{Dependency_graph_weight_PNG}
127   \caption{\label{DepGraphWeight} Example of weighting}
128\end{figure}
129
130%Dans la figure~\ref{étiquette} page~\pageref{étiquette},  
131
132
133
134After this pre-processing phase, we will have a list of properties $L_\phi  $ ordered according to their pertinency in comparison to the global property.
135
136
137
138
139\subsection{Initial abstraction generation}
140
141In the initial abstraction generation, all primary variables have to be represented. Therefore the first element(s) in the list where the primary variables are present will be used to generate the initial abstraction, $\widehat{M}_0$ and we will verify the satisfiability of the 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.
142
143
144
145\subsection{Abstraction refinement}
146
147The refinement process from $\widehat{M}_i$ to $\widehat{M}_{i+1}$ can be seperated into 2 steps:
148
149\begin{enumerate}
150
151\item {\emph{\underline{Step 1:}} \\
152
153As we would like to ensure the elimination of the counterexample previously found, we filter out properties that don't have an impact on the counterexample $\sigma_i$ thus won't eliminate it. In order to reach this obective, a Kripke Structure of the counterexample $\sigma_i$, $K(\sigma_i)$ is generated. $K(\sigma_i)$ is a succession of states corresponding to the counterexample path which dissatisfies the global property $\phi$.
154
155\bigskip
156
157\begin{definition}
158\textbf{\emph{The counterexample $\sigma_i$ Kripke Structure $K(\sigma_i)$ :}} \\
159Let a counterexample of length $n$, $ \sigma_i = \langle s_{\bar{a}i,0}, s_{\bar{a}i,1},\\ s_{\bar{a}i,2}, ... , s_{\bar{a}i,k}, s_{\bar{a}i,k+1}, ... , s_{\bar{a}i,n}\rangle $ with $ \forall k \in [0,n-1]$, we have \\
160$K(\sigma_i) = (AP_{\sigma_i}, S_{\sigma_i}, S_{0\sigma_i}, L_{\sigma_i}, R_{\sigma_i})$ a 5-tuple consisting of :
161
162\begin{itemize}
163\item { $AP_{\sigma_i}$ : a finite set of atomic propositions which corresponds to the variables in the abstract model $\widehat{V}_{i}$ }     
164\item { $S_{\sigma_i} = \{s_{\bar{a}i,0}, s_{\bar{a}i,1}, s_{\bar{a}i,2}, ... , s_{\bar{a}i,k}, s_{\bar{a}i,k+1}, ... , s_{\bar{a}i,n}\}$}
165\item { $S_{0\sigma_i} = \{s_{\bar{a}i,0}\}$}
166\item { $L_{\sigma_i}$ : $S_{\sigma_i} \rightarrow 2^{AP_{\sigma_i}}$ : a labeling function which labels each state with the set of atomic propositions true in that state. }
167\item { $R_{\sigma_i}$ = $ (s_{\bar{a}i,k}, s_{\bar{a}i,k+1})$ }
168\end{itemize}
169\end{definition}
170
171%\bigskip
172All the properties available are then model-checked on $K(\sigma_i)$.
173
174If:
175\begin{itemize}
176\item {\textbf{$K(\sigma_i) \vDash \varphi  \Rightarrow \varphi $ will not eliminate $\sigma_i$}}
177\item {\textbf{$K(\sigma_i) \nvDash \varphi  \Rightarrow \varphi $ will eliminate $\sigma_i$}}
178\end{itemize}
179
180%\bigskip
181
182
183\begin{figure}[h!]
184   \centering
185%   \includegraphics[width=1.2\textwidth]{K_sigma_i_S_PNG}
186%     \hspace*{-15mm}
187     \includegraphics{K_sigma_i_S_PNG}
188   \caption{\label{AKSNegCex} Kripke Structure of counterexample $\sigma_i$, $K(\sigma_i)$}
189\end{figure}
190
191%Dans la figure~\ref{étiquette} page~\pageref{étiquette},  
192
193%\bigskip
194
195
196\begin{figure}[h!]
197   \centering
198
199\begin{tikzpicture}[->,>=stealth',shorten >=1.5pt,auto,node distance=1.8cm,
200                    thick]
201  \tikzstyle{every state}=[fill=none,draw=blue,text=black]
202
203  \node[initial,state] (A)                            {$s_{\bar{a}i,0}$};
204  \node[state]           (B) [below of=A]     {$s_{\bar{a}i,1}$};
205
206  \node[state]           (C) [below of=B]        {$s_{\bar{a}i,k}$};
207
208  \node[state]           (D) [below of=C]       {$s_{\bar{a}i,n-1}$};
209  \node[state]           (E) [below of=D]       {$s_{\bar{a}i,n}$};
210
211  \path (A) edge              node {} (B)
212            (B) edge       node {} (C)
213            (C) edge             node {} (D)
214            (D) edge             node {} (E);
215
216\end{tikzpicture}
217
218   \caption{\label{AKSNegCex} Kripke Structure of counterexample $\sigma_i$, $K(\sigma_i)$}
219\end{figure}
220
221
222Therefore all properties that are satisfied won't be chosen to be integrated in the next step of refinement. At this stage, we already have a list of potential properties that will definitely eliminate the current counterexample $\sigma_i$ and might converge the abstract model towards a model sufficient to verify the global property $\phi$.
223
224}
225%\bigskip
226
227\item {\emph{\underline{Step 2:}} \\
228
229The property at the top of the list (not yet selected and excluding the properties which are satisfied by $K(\sigma_i)$) is selected to be integrated in the generation of $\widehat{M}_{i+1}$.
230%\bigskip
231
232}
233\end{enumerate}
234
235$\widehat{M}_{i+1}$ is model-checked and the refinement process is repeated until the model satisfies the global property or there is no property left to be integrated in next abstraction.
236
237
Note: See TracBrowser for help on using the repository browser.