source: papers/FDL2012/ordering_filter_properties.tex @ 68

Last change on this file since 68 was 68, checked in by ema, 12 years ago
File size: 12.3 KB
Line 
1We take advantage of the specification of verified components to build more
2accurate abstractions. The key, here, is how to select the part of the
3specification relevent for the proof of the global property. We propose an
4heuristic to order the properties of each component depending on the structure
5of each component.
6%Before 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$.
7In order to do so, the variable dependency of the variables present in global property has to be analysed.
8After this point, we refer to the variables present in the global property  as \emph{primary variables}.
9
10%\bigskip
11
12The ordering of the properties will be based on the variable dependency graph
13where the roots are primary variables.
14The variables in the model are weighted according to their dependency level
15\emph{vis-à-vis} primary variables and the properties will be weighted according to the sum of the weights
16of the variables present in it. We want to select the properties that describe
17behaviors that have an impact on the global one. Hence, the more closer a variable is from the primary
18variable the more its behavior affects the primary variable. A property will
19have higher priority the more of primary or close to primary variables it
20contains.
21Moreover, a global property often specifies the behavior at the interface of
22components. Typicaly, a global property will ensure that a message sent is
23always acknoledge or the good target get the message. This kind of behavior
24relates the input-output behaviors of components.
25We have decided to allocate an extra weight for variables which are present at the interface of a component
26whereas variables which do not interfere in the obtention of a primary variable will be weighted 0.
27Here is how we proceed:
28\begin{enumerate}
29\item Build the dependency graph for all primary variables.
30\item Compute the depth of all variables (DFS or BFS)
31algorithm for all dependency graph.
32Note that a variable may belong to more than one dependency graph, in that case
33we consider the minimum depth.
34\item Give a weight to each variables (see algorithm  \ref{algo:weight}).
35\item Compute the weight of properties for each component.
36\end{enumerate}
37
38The algorithm \ref{algo:weight} gives weight according to the variable distance to the
39primary variable with extra weight for interface variable and primary variable.
40
41\begin{algorithm}[h]
42\caption{Compute Weight}
43\label{algo:weight}
44
45\KwIn{ $\{V\}$, the set of all dependency graph variable}
46\KwOut{$\{(v,w)| v \in V, w \in N\}$, The set of variables with their weight}
47
48\Begin{
49$p = $ max(depth(V))  \\
50\For{$v\in V$}{
51        d = depth(v) \;
52        $w = 2^{p-d}*p$\;
53        \If(v is primary variable){$d == 0$}
54        {
55                $w = 5 * w$\;
56        }
57        \If(v is an interface variable){$v\in{I\cup O}$}
58        {
59                $w = 3 * w $
60        }
61}
62}
63\end{algorithm}
64%\begin{enumerate}
65%
66%\item {\emph{Establishment of primary variables' dependency and maximum graph depth}\\
67%Each 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.
68%Given 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})) $.
69%
70%}
71%
72%\item {\emph{Weight allocation for each variables} \\
73%Let's suppose $max_d$ is the maximum dependency graph depth calculated and $p$ is the unit weight. We allocate the variable weight as follows:
74%\begin{itemize}
75%\item{All the variables at degree $max_d$ of every dependency graph will be allocated the weight of $p$.}
76% \\ \hspace*{20mm} $Wv_{max_d} = p$
77%\item{All the variables at degree $max_d - 1$ of every dependency graph will be allocated the weight of $2Wv_{max_d}$.}
78%\\ \hspace*{20mm} $Wv_{max_d - 1} = 2Wv_{max_d}$
79%\item{...}
80%\item{All the variables at degree $1$ of every dependency graph will be allocated the weight of $2Wv_{2}$.}
81% \\ \hspace*{20mm} $Wv_{1} = 2Wv_{2}$
82%\item{All the variables at degree $0$ (i.e. the primary variables) will be allocated the weight of $10Wv_{1}$.}
83% \\ \hspace*{20mm} $Wv_{0} = 10Wv_{1}$
84%\end{itemize}
85%
86%We can see here that the primary variables are given a considerable
87%ponderation 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$.
88%}
89%
90%
91%\item {\emph{Ordering of the properties} \\
92%Properties 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}}$ .
93%After 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$.
94%
95%
96%}
97%
98%\end{enumerate}
99
100%\bigskip
101
102%\emph{\underline{Example:}}  \\
103%
104%For example, if a global property $\phi$ consists of 3 variables: $ p, q, r $ where:
105%\begin{itemize}
106%\item{$p$ is dependent of $a$ and $b$}
107%\item{$b$ is dependent of $c$}
108%\item{$q$ is dependent of $x$}
109%\item{$r$ is independent}
110%\end{itemize}
111%
112%Example with unit weight= 50.
113%The primary variables: $p$, $q$ and $r$ are weighted $100*10=1000$ each. \\
114%The secondary level variables : $a$, $b$ and $x$ are weighted $50x2=100$ each. \\
115%The tertiary level variable $c$ is weighted $50$. \\
116%The weight of a non-related variable is $0$.
117%
118%
119%\bigskip
120%\begin{figure}[h!]
121%   \centering
122%%   \includegraphics[width=1.2\textwidth]{Dependency_graph_weight_PNG}
123%%     \hspace*{-15mm}
124%     \includegraphics{Dependency_graph_weight_PNG}
125%   \caption{\label{DepGraphWeight} Example of weighting}
126%\end{figure}
127
128%Dans la figure~\ref{étiquette} page~\pageref{étiquette},  
129
130
131
132Each verified properties available pertinency will be evaluated by adding the weights of all the variables in it.
133It is definitely not an exact pertinency calculation of properties but provides a good indicator
134of their possible impact on the global property.
135After this pre-processing phase, we will have a list of properties $L_\phi$
136ordered according to their pertinency in comparison to the global property.
137
138
139
140
141\subsection{Filtering properties}
142The refinement step consists of adding new AKS of properties selected according to
143their pertinency. This refinement respects the points 1 and 2 of definition
144\ref{def:goodrefinement}. The first item comes form AKS definition.
145Adding a new AKS in the abstraction leads to an abstraction where more behaviors
146are characterized. Hence there is more constrains behavior and more concretize
147states.
148
149\TODO{Cecile}{Mettre definition, property and proof ?????}
150
151Unforutnatly, this refinement does not ensure that the spurious counter-example
152is evicted.
153As we would like to ensure the elimination of the counterexample previously found,
154we filter out properties that don't have an impact on the counterexample $\sigma_i$ thus won't eliminate it.
155In order to reach this obective, a AKS of the counterexample $\sigma_i$, $K(\sigma_i)$
156is generated. $K(\sigma_i)$ is a succession of states corresponding to the counterexample path which dissatisfies
157the global property $\Phi$. It is an abstract kripke structure since not all
158variables are concrete.
159Each properties
160All the properties available are then model-checked on $K(\sigma_i)$. If the
161property holds then the property will not discriminate the counter-example.
162Hence this property is not a good candidate for refinement.
163Therefore 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$.
164
165
166\TODO{Revoir la definition et Proof}
167
168The refinement process from $\widehat{M}_i$ to $\widehat{M}_{i+1}$ can be seperated into 2 steps:
169
170\begin{enumerate}
171
172\item {\emph{\underline{Step 1:}} \\
173
174As 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$.
175
176\bigskip
177
178\begin{definition}
179\textbf{\emph{The counterexample $\sigma_i$ Kripke Structure $K(\sigma_i)$ :}} \\
180Let 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 \\
181$K(\sigma_i) = (AP_{\sigma_i}, S_{\sigma_i}, S_{0\sigma_i}, L_{\sigma_i}, R_{\sigma_i})$ a 5-tuple consisting of :
182
183\begin{itemize}
184\item { $AP_{\sigma_i}$ : a finite set of atomic propositions which corresponds to the variables in the abstract model $\widehat{V}_{i}$ }     
185\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}\}$}
186\item { $S_{0\sigma_i} = \{s_{\bar{a}i,0}\}$}
187\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. }
188\item { $R_{\sigma_i}$ = $ (s_{\bar{a}i,k}, s_{\bar{a}i,k+1})$ }
189\end{itemize}
190\end{definition}
191
192%\bigskip
193All the properties available are then model-checked on $K(\sigma_i)$.
194
195If:
196\begin{itemize}
197\item {\textbf{$K(\sigma_i) \vDash \varphi  \Rightarrow \varphi $ will not eliminate $\sigma_i$}}
198\item {\textbf{$K(\sigma_i) \nvDash \varphi  \Rightarrow \varphi $ will eliminate $\sigma_i$}}
199\end{itemize}
200
201%\bigskip
202
203
204%\begin{figure}[h!]
205%   \centering
206%%   \includegraphics[width=1.2\textwidth]{K_sigma_i_S_PNG}
207%%     \hspace*{-15mm}
208%     \includegraphics{K_sigma_i_S_PNG}
209%   \caption{\label{AKSNegCex} Kripke Structure of counterexample $\sigma_i$, $K(\sigma_i)$}
210%\end{figure}
211
212%Dans la figure~\ref{étiquette} page~\pageref{étiquette},  
213
214%\bigskip
215
216
217\begin{figure}[h!]
218   \centering
219
220\begin{tikzpicture}[->,>=stealth',shorten >=1.5pt,auto,node distance=2cm,
221                    thick]
222  \tikzstyle{every state}=[fill=none,draw=blue,text=black, minimum size=1.5cm]
223
224  \node[initial,state] (A)                            {$s_{\bar{a}i,0}$};
225  \node[state]           (B) [below of=A]     {$s_{\bar{a}i,1}$};
226
227  \node[state]           (C) [below of=B]        {$s_{\bar{a}i,k}$};
228
229  \node[state]           (D) [below of=C]       {$s_{\bar{a}i,n-1}$};
230  \node[state]           (E) [below of=D]       {$s_{\bar{a}i,n}$};
231
232  \path (A) edge              node {} (B)
233            (B) edge       node {} (C)
234            (C) edge             node {} (D)
235            (D) edge             node {} (E);
236
237\end{tikzpicture}
238
239   \caption{\label{AKSNegCex} Kripke Structure of counterexample $\sigma_i$, $K(\sigma_i)$}
240\end{figure}
241
242
243}
244%\bigskip
245
246\item {\emph{\underline{Step 2:}} \\
247
248The 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}$.
249%\bigskip
250
251}
252\end{enumerate}
253
254$\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.
255
256
Note: See TracBrowser for help on using the repository browser.