source: papers/FDL2012/ordering_filter_properties.tex @ 89

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

corrections typos and co

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