source: papers/FDL2012/ordering_filter_properties.tex @ 72

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

partie raffinement avec liste des propriétés mis à jour

File size: 13.2 KB
Line 
1We take advantage of the specification of verified components to build more
2accurate abstractions. The key is how to select the part of the
3specification relevant enough to prove the global property. We propose an
4heuristic to order the properties  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 analyzed.
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 specifying
17behaviors that may have an impact on the global property. We observed that
18the more closer a variable is from the primary
19variable the more it affects the primary variable. Hence, a property will
20have higher priority according to the number of primary or close to primary variables it
21contains.
22Moreover, a global property often specifies the behavior at the interface of
23components. Typically, a global property will ensure that a message sent is
24always acknowledge or the good target get the message. This kind of behavior
25relates the input-output behaviors of components.
26We have decided to allocate an extra weight for variables which are present at the interface of a component
27whereas variables which do not interfere with a primary variable will be weighted 0.
28Here is how we proceed:
29\begin{enumerate}
30\item Build the dependency graph for all primary variables.
31\item Compute the depth of all variables (DFS or BFS)
32in all dependency graph.
33Note that a variable may belong to more than one dependency graph, in that case
34we consider the minimum depth.
35\item Give a weight to each variables (see algorithm  \ref{algo:weight}).
36\item Compute the weight of properties for each component.
37\end{enumerate}
38
39The algorithm \ref{algo:weight} gives weight according to the variable distance to the
40primary variable with extra weight for interface variable and primary variable.
41
42\begin{algorithm}[ht]
43\caption{Compute Weight}
44\label{algo:weight}
45
46\KwIn{ $\{V\}$, the set of all dependency graph variable}
47\KwOut{$\{(v,w)| v \in V, w \in N\}$, The set of variables with their weight}
48
49\Begin{
50$p = $ max(depth(V))  \\
51\For{$v\in V$}{
52        d = depth(v) \;
53        $w = 2^{p-d}*p$\;
54        \If(v is primary variable){$d == 0$}
55        {
56                $w = 5 * w$\;
57        }
58        \If(v is an interface variable){$v\in{I\cup O}$}
59        {
60                $w = 3 * w $
61        }
62}
63}
64\end{algorithm}
65%\begin{enumerate}
66%
67%\item {\emph{Establishment of primary variables' dependency and maximum graph depth}\\
68%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.
69%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})) $.
70%
71%}
72%
73%\item {\emph{Weight allocation for each variables} \\
74%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:
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%
87%We can see here that the primary variables are given a considerable
88%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$.
89%}
90%
91%
92%\item {\emph{Ordering of the properties} \\
93%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}}$ .
94%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$.
95%
96%
97%}
98%
99%\end{enumerate}
100
101%\bigskip
102
103%\emph{\underline{Example:}}  \\
104%
105%For 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%
113%Example with unit weight= 50.
114%The primary variables: $p$, $q$ and $r$ are weighted $100*10=1000$ each. \\
115%The secondary level variables : $a$, $b$ and $x$ are weighted $50x2=100$ each. \\
116%The tertiary level variable $c$ is weighted $50$. \\
117%The weight of a non-related variable is $0$.
118%
119%
120%\bigskip
121%\begin{figure}[h!]
122%   \centering
123%%   \includegraphics[width=1.2\textwidth]{Dependency_graph_weight_PNG}
124%%     \hspace*{-15mm}
125%     \includegraphics{Dependency_graph_weight_PNG}
126%   \caption{\label{DepGraphWeight} Example of weighting}
127%\end{figure}
128
129%Dans la figure~\ref{étiquette} page~\pageref{étiquette},  
130
131
132
133Each verified properties available pertinence will be evaluated by adding the weights of all the variables in it.
134It is definitely not an exact pertinence calculation of properties but provides a good indicator
135of their possible impact on the global property.
136After this pre-processing phase, we will have a list of properties $L_\phi$
137ordered according to their pertinence in comparison to the global property.
138
139
140
141
142\subsection{Filtering properties}
143The refinement step consists of adding new AKS of properties selected according to
144their pertinence. This refinement respects items 1 and 2 of definition
145\ref{def:goodrefinement}. The first item comes form AKS definition.
146<<<<<<< .mine
147Adding a new AKS in the abstraction leads to an abstraction where more behaviors
148are characterized. Hence there is more constrains behavior and more concretize
149states.
150
151\remark{Cécile}{Mettre definition, property and proof ?????}
152
153Unfortunately, this refinement does not ensure that the spurious counterexample
154is evicted.
155As we would like to ensure the elimination of the counterexample previously found,
156we filter out properties that don't have an impact on the counterexample $\sigma$ thus won't eliminate it.
157In order to reach this objective, a Abstract Kripke structure of the counterexample $\sigma$, $K(\sigma)$
158is generated. $K(\sigma)$ is a succession of states corresponding to the counterexample path which dissatisfies
159the global property $\Phi$ as show in figure \ref{AKSNegCex}. We add a last
160state $s_t$ where all variable are free({\it unknown}). The tree starting from this
161state represents all the possible future of the counterexample.
162
163
164
165
166%\begin{enumerate}
167%
168%\item {\emph{\underline{Step 1:}}} \\
169%
170%As 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$.
171%
172%\bigskip
173%
174\begin{definition}
175Let $\sigma$ be a counter-example of length $n$ in $\widehat{M}_i$ such
176that $ \sigma =  s_{0}\rightarrow  s_{1}\rightarrow \ldots \rightarrow
177s_{n-1}$. The \emph{Kripke structure derived from $\sigma$} is 6-tuple
178$K(\sigma_i) = (AP_{\sigma}, S_{\sigma}, S_{0\sigma}, L_{\sigma},
179R_{\sigma},F_{\sigma})$
180such that:
181
182\begin{itemize}
183\item $AP_{\sigma} = \widehat{AP}_i$ : a finite set of atomic propositions which corresponds to the variables in the abstract model     
184\item $S_{\sigma} = \{s_{i}|s_i\in \sigma\}\cup\{s_T\}$
185\item $S_{0\sigma} = \{s_{0}\}$
186\item $L_{\sigma} = \widehat{L}_i$
187\item $R_{\sigma} =  \{(s_{k}, s_{k+1})|(s_{k}\rightarrow s_{k+1})\in
188\sigma\}\cup\{(s_{n-1},s_T)\}$ 
189\item $F_{\sigma} = \emptyset$ 
190\end{itemize}
191\end{definition}
192
193%%\bigskip
194%All the properties available are then model-checked on $K(\sigma_i)$.
195%
196%If:
197%\begin{itemize}
198%\item {\textbf{$K(\sigma_i) \vDash \varphi  \Rightarrow \varphi $ will not eliminate $\sigma_i$}}
199%\item {\textbf{$K(\sigma_i) \nvDash \varphi  \Rightarrow \varphi $ will eliminate $\sigma_i$}}
200%\end{itemize}
201%
202%%\bigskip
203%
204%
205%%\begin{figure}[h!]
206%%   \centering
207%%%   \includegraphics[width=1.2\textwidth]{K_sigma_i_S_PNG}
208%%%     \hspace*{-15mm}
209%%     \includegraphics{K_sigma_i_S_PNG}
210%%   \caption{\label{AKSNegCex} Kripke Structure of counterexample $\sigma_i$, $K(\sigma_i)$}
211%%\end{figure}
212%
213%%Dans la figure~\ref{étiquette} page~\pageref{étiquette},  
214%
215%%\bigskip
216%
217%
218\begin{figure}[h!]
219   \centering
220
221\begin{tikzpicture}[->,>=stealth',shorten >=1.5pt,auto,node distance=2cm,
222                    thick]
223  \tikzstyle{every state}=[fill=none,draw=blue,text=black, minimum size=1.1cm]
224
225  \node[initial,state] (A)                    {$s_{0}$};
226  \node[state]         (B) [below of=A]       {$s_{1}$};
227  \node[node distance=1.5cm]       (C) [below of=B]       {$\ldots$};
228  \node[state,node distance=1.5cm]       (D) [below of=C]     {$s_{n-1}$};
229  \node[state]         (E) [below of=D]     {$s_T$};
230
231  \path (A) edge node {} (B)
232        (B) edge node {} (C)
233        (C) edge node {} (D)
234        (D) edge node {} (E)
235        (E) edge[loop right] node {} (E);
236
237\end{tikzpicture}
238
239   \caption{\label{AKSNegCex} Kripke Structure of counterexample $\sigma$, $K(\sigma)$}
240\end{figure}
241
242All the properties available for refinement are then model-checked on $K(\sigma)$. If the
243property holds then the property will not discriminate the counterexample.
244Hence this property is not a good candidate for refinement.
245Therefore 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$ and might converge the abstract model towards a model sufficient to verify the global property $\Phi$.
246
247\begin{property}{Counterexample evicted}
248\begin{enumerate}
249\item If {\textbf{$K(\sigma) \vDash \varphi  \Rightarrow AKS(\varphi) $ will
250not eliminate $\sigma$}}.
251\item If {\textbf{$K(\sigma) \nvDash \varphi  \Rightarrow AKS(\varphi) $ will
252eliminate $\sigma$}}.
253\end{enumerate}
254\end{property}
255\begin{proof}
256By construction, $AKS(\varphi)$ simulates all model that verify
257$\varphi$. Thus the tree describes by $K(\sigma)$ exists in $AKS(\varphi)$,
258$\sigma$ is still a possible path in $AKS(\varphi)$.\\
259Conversely $K(\sigma_i)$, where $\varphi$ does not hold, is not simulated by
260$AKS(\varphi)$, thus $\sigma$ is not a possible path in $AKS(\varphi)$
261otherwise $AKS(\varphi)\not\models \varphi$ that is not feasible due to AKS
262definition.
263
264\end{proof}
265
266The property at the top of the list (not yet selected and excluding the properties
267which are satisfied by $K(\sigma)$) is selected to be integrated in the generation of $\widehat{M}_{i+1}$.
268We ensure that our refinement respect the definition \ref{def:goodrefinement}.
269Moreover, the time needed to build an AKS can be neglected and building the
270next abstraction is just a parallel composition with the previous one. Thus the refinement
271 we propose is not time consuming.
272
273
274%
275%}
276%%\bigskip
277%
278%\item {\emph{\underline{Step 2:}} \\
279%
280%The 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}$.
281%%\bigskip
282%
283%}
284%\end{enumerate}
285%
286%$\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.
287%
288
Note: See TracBrowser for help on using the repository browser.