[52] | 1 | |
---|
| 2 | |
---|
[56] | 3 | \subsection{Properties of good refinement} |
---|
| 4 | 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. |
---|
| 5 | 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}$ respects the properties below: |
---|
[52] | 6 | |
---|
| 7 | %\medskip |
---|
| 8 | |
---|
[68] | 9 | \begin{definition} An efficient \emph{refinement} verifies the following properties: |
---|
[56] | 10 | \begin{enumerate} |
---|
[63] | 11 | \item The new refinement is an over-approximation of the concrete model: $\widehat{M}_{i+1} \sqsubseteq \widehat{M}$. |
---|
| 12 | \item The new refinement is more concrete than the previous one: |
---|
[56] | 13 | $\widehat{M}_{i} \sqsubseteq \widehat{M}_{i+1}$. |
---|
[69] | 14 | \item The spurious counterexample in $\widehat{M}_i$ is removed from |
---|
[56] | 15 | $\widehat{M_{i+1}}$. |
---|
| 16 | \end{enumerate} |
---|
[67] | 17 | \label{def:goodrefinement} |
---|
[58] | 18 | \end{definition} |
---|
[52] | 19 | |
---|
[56] | 20 | Moreover, the refinement steps should be easy to compute and ensure a fast |
---|
| 21 | convergence by the minimizing the number of iteration of the CEGAR loop. |
---|
[52] | 22 | |
---|
[63] | 23 | Refinements based on the concretization of selected abstract variables in $\widehat{M}_i$ ensure item 2. Concretization can be performed either in modifying the AKS of $\widehat{M}_i$, by changing some abstract value to concrete ones, but this approach is rude : in order to ensure item 1, concretization needs to be coherent with the sequences of values in the concrete system. The difficulty resides in defining the proper abstract variable to concretize, at which precise instant, and with which Boolean value. |
---|
[69] | 24 | Another way to concretize some variables at selected instants is to compose (by a synchronous product) the AKS of $\widehat{M}_i$ with a new AKS, provided this latest represents over-approximations of the set of behaviors of $M$. By construction, this product satisfies items 1 and 2. We now have to compute an AKS eliminating the spurious counterexample, being easily computable and ensuring a quick convergence of the CEGAR loop. |
---|
[52] | 25 | |
---|
[69] | 26 | Several proposals can be made. The most straightforward consists in building the AKS representing all possible executions except the spurious counterexample ; however the AKS representation may be huge and the process is not guaranteed to converge. A second possibility is to build an AKS with additional CTL properties of the components ; the AKS remains small but item 3 is not guaranteed, hence delaying the convergence. The final proposal combines both previous ones : first local CTL properties eliminating the spurious counter example are determined, and then the corresponding AKS is synchronized with the one of $\widehat{M}_i$. |
---|
[52] | 27 | |
---|
| 28 | |
---|
[63] | 29 | \subsection{Refinement by negation of the counterexample} |
---|
| 30 | |
---|
[56] | 31 | The counterexample at a refinement step $i$, $\sigma$ is a path in the |
---|
[65] | 32 | abstract model $\widehat{M}_i$ which dissatisfy $\Phi$. In the counterexample given by the model-checker, the variables value in each states are boolean. |
---|
[69] | 33 | The spurious counterexample $\sigma$ is defined such that : |
---|
[52] | 34 | \begin{definition} |
---|
[69] | 35 | Let $\sigma$ be a \emph{counter-example} in $\widehat{M}_i =\langle \widehat{AP}_i, \widehat{S}_i, \widehat{S}_{0i}, |
---|
| 36 | \widehat{L}_i, \widehat{R}_i, \widehat{F}_i \rangle$ of length$|\sigma| = n$: $ \sigma = s_{0} \rightarrow s_{1} \ldots |
---|
| 37 | \rightarrow s_{n}$ with $(s_{k}, s_{k+1}) \in \widehat{R}_i$ $\forall k \in [0..n-1]$. |
---|
[56] | 38 | \begin{itemize} |
---|
| 39 | \item All its variables are concrete: $\forall s_i$ and $\forall p\in |
---|
| 40 | \widehat{AP}_i$, $p$ is either true or false |
---|
[63] | 41 | (not {\it unknown}), and $s_0 $ is an initial state of the concrete system: $s_0 \in \mathbf{R}_0$ |
---|
[69] | 42 | \item $\sigma$ is a counterexample in $\widehat{M}_i$: $s_0\not\models \Phi$. |
---|
[63] | 43 | \item $\sigma$ is not a path of the concrete system $M$: $\exists k \in [1..n-1]$ such |
---|
| 44 | that $\forall j < k, (s_j,s_{j+1}) \in R$ and $(s_{k}, s_{k+1}) \not\in R$. |
---|
[57] | 45 | \end{itemize} |
---|
[52] | 46 | \end{definition} |
---|
| 47 | |
---|
[68] | 48 | The construction of the AKS representing all executions except the one described by the spurious counter-example is done in two steps. |
---|
| 49 | \subsubsection{step 1 : Build the structure of the AKS.} |
---|
| 50 | Let us denote $AKS(\overline{\sigma})$ this AKS. $AKS(\overline{\sigma}) = \langle \widehat{AP}_{\overline{\sigma}}, \widehat{S}_{\overline{\sigma}}, \widehat{S}_{0{\overline{\sigma}}}, |
---|
| 51 | \widehat{L}_{\overline{\sigma}}, \widehat{R}_{\overline{\sigma}}, \widehat{F}_{\overline{\sigma}} \rangle$. |
---|
| 52 | \begin{itemize} |
---|
| 53 | \item The set of atomic propositions coincides with the one of $\sigma$ : $AP_{\overline{\sigma}} = {AP}_i$ |
---|
| 54 | \item Build a state $s_T$, and for each state $s_i$ in $\sigma$, build two states $s'_i$ and $s"_i$. $s_T \in S_{\overline{\sigma}}$ and forall $i$ in $[0..n-1]$ : $s'_i \in S_{\overline{\sigma}}$ and $s"_i \in S_{\overline{\sigma}}.$ |
---|
| 55 | \item State labeling : $s'_i$ represents the (concrete) configuration of state $s_i$ and state $s"_i$ represents all configurations but the one of $s_i$. This last set may not be representable by the labeling function defined in def \ref{def-aks}. State labeling is treated in the second step. |
---|
| 56 | \item States $s'_0$ and $s"_0$ are initial states. |
---|
| 57 | \item Transitions : Forall $i$ in $[1..n-1]$, connect $s'_i$ and $s"_i$ to their predecessor state $s'_{i-1}$: $(s'_{i-1},s'_i) \in R_{\overline{\sigma}}$ and $(s'_{i-1},s"_i) \in R_{\overline{\sigma}}$ and connect all $s"$ states as predecessor of the $s_T$ state : $(s"_i,s_T) \in R_{\overline{\sigma}}$. |
---|
| 58 | \item \TODO{FAIRNESS} |
---|
| 59 | \end{itemize} |
---|
| 60 | The size of this structure is linear with the size of the counter-example, however it is not a strict AKS since the representation of the set of configurations in states $s"$ may lead to a union of labels. |
---|
[58] | 61 | |
---|
[68] | 62 | \subsubsection{Step 2 : Expand state configurations representing the negation of a concrete configuration.} |
---|
| 63 | We return back to the labeling of states of $AKS(\overline{\sigma})$. As states $s'$ are associated with the same (concrete) configuration as their corresponding state in $\sigma$, their labeling is straightforward : $\forall i \in [0..n-1], {L}_{\overline{\sigma}}(s'_i) = \widehat{L}_{i}(s_i)$. |
---|
| 64 | The set of configurations associated with a state $s"_i$ represents the negation of the one represented by ${L}_{\overline{\sigma}}(s'_i)$. This negation is not representable by the label of a single state but rather by a union of $\mid AP \mid$ labels. |
---|
[58] | 65 | |
---|
[68] | 66 | \emph{Example}. Assume $AP = \{v_0,v_1,v_2\}$ and $\sigma = s_0 \rightarrow s_1, \ldots$ and $\widehat{L}(s_0) = \{\mathbf{f},\mathbf{f},\mathbf{f}\}$ meaning the configuration associated with $s_0$ assigns false to each variable. The negation of this configuration represents a set of seven concrete configurations which are covered by three (abstract) configurations: $\{\{\mathbf{t},\top,\top\},\{\mathbf{f},\mathbf{t},\top\},\{\mathbf{f},\mathbf{f},\mathbf{t}\}\}$. |
---|
[58] | 67 | |
---|
[68] | 68 | To build the final AKS representing all sequences but spurious counter-example $\sigma$, one replaces in $AKS(\overline{\sigma})$ each state $s"_i$ by $n = \mid AP_{\overline\sigma} \mid$ states $s"_i^k$ with $k \in [0..n-1]$ and assigns to each of them a label of $n$ variables $\{v_0, \ldots, v_{n-1}\}$ defined such that : ${L}(s"_i^k) = \{\forall l \in [0..k], v_l = \neg {L}_{i}(s'_i)[v_l], \forall l \in [k+1..n-1], v_l = \top\}$. |
---|
| 69 | \TODO{connexion des $s"_i^k$} |
---|
[58] | 70 | |
---|
[68] | 71 | This final AKS presents a number of states which is linear with the length of the counter-example and the number of atomic propositions. |
---|
[58] | 72 | |
---|
[68] | 73 | \TODO{Revoir notation def 3 pour f,t,top et introduire notation ${L}_{i}(s'_i)[v_l]$} |
---|
| 74 | |
---|
| 75 | Removing the spurious counter-example only has little chance to converge. |
---|
| 76 | |
---|
[52] | 77 | %\bigskip |
---|
| 78 | |
---|
[56] | 79 | %\begin{definition} |
---|
| 80 | %\textbf{\emph{Spurious counterexample :}} \\ |
---|
| 81 | %\\ |
---|
| 82 | %Let $\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'}$.\\ |
---|
| 83 | % |
---|
| 84 | %\smallskip |
---|
| 85 | % |
---|
| 86 | %If $\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}. |
---|
| 87 | % |
---|
| 88 | %\end{definition} |
---|
[52] | 89 | |
---|
| 90 | |
---|
| 91 | |
---|
[56] | 92 | \subsection{Ordering of properties} |
---|
[52] | 93 | |
---|
[65] | 94 | \input{ordering_filter_properties} |
---|