Index: papers/FDL2012/FDL2012.tex
===================================================================
--- papers/FDL2012/FDL2012.tex	(revision 55)
+++ papers/FDL2012/FDL2012.tex	(revision 56)
@@ -65,5 +65,5 @@
 
 \input{framework}
-\section{Abstraction Generation and Refinement}
+\section{Refinement}
 
 \input{abstraction_refinement}
Index: papers/FDL2012/abstraction_refinement.tex
===================================================================
--- papers/FDL2012/abstraction_refinement.tex	(revision 55)
+++ papers/FDL2012/abstraction_refinement.tex	(revision 56)
@@ -1,56 +1,68 @@
-\subsection{Generalities}
 
 We 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$.
 
-\subsubsection{Refinement}
-The 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:
+\subsection{Properties of good refinement}
+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}$ respects the properties below:
 
 %\medskip
 
 \begin{property}
-All $\widehat{M}_i$ generated are upper-approximations of $M$. Furthermore, we guarantee that $\widehat{M}_{i+1} \sqsubseteq \widehat{M}_i$.
+\begin{enumerate}
+\item The new refinment is an over-approximation of the concrete model: $\widehat{M}_{i+1} \sqsubseteq \widehat{M}$.
+\item The new refinment is more concrete than the previous one:
+$\widehat{M}_{i} \sqsubseteq \widehat{M}_{i+1}$.
+\item The spurious counter-example in $\widehat{M}_i$ is  removed from
+$\widehat{M_{i+1}}$.
+\end{enumerate}
 \end{property}
-%\bigskip
-\begin{property}
-$\sigma_i$ is a counterexample of $\widehat{M}_i$ and $\sigma_i$ is not a counterexample of $\widehat{M}_{i+1}$.
-\end{property}
-
-%\bigskip
-%\newpage
-
-\subsubsection{The Counterexample}
-
-
-The 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.
-%\medskip
-
+
+Moreover, the refinement steps should be easy to compute and ensure a fast
+convergence by the minimizing the number of iteration of the CEGAR loop.
+
+
+A possible refinement : concretization of selected abstract variables. How to choose variables and instants of concretization : introduce new CTL properties. The question is : how to select pertinent CTL properties ???
+
+\TODO{discussion sur comment garantir les points 1/2/3 et le reste du bon
+rafinement}
+\subsection{The Counterexample}
+
+\TODO{Mettre la def avant}
+\TODO{Rafinement par nÃ©gation du contre-exemple}
+The counterexample at a refinement step $i$, $\sigma$ 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.
+The spurious counter-example $\sigma$ is defined such that :
 \begin{definition}
-\textbf{\emph{The counterexample $\sigma_i$ :}} \\
+\textbf{\emph{The counterexample $\sigma$ :}} \\
 \\
-Let $\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$. \\
-Furthermore, 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$. \\
-\\
-(\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$.)\\
-
-%\medskip
-
+Let $\widehat{M}_i =\langle \widehat{AP}_i, \widehat{S}_i, \widehat{S}_{0i},
+\widehat{L}_i, \widehat{R}_i, \widehat{F}_i \rangle$ and let the length of the
+counterexample, $|\sigma| = n$: $ \sigma = s_{0} \rightarrow s_{1} \ldots
+s_{n}$ with $(s_{k}, s_{k+1}) \in \widehat{R}_i$ $\forall k \in [0..n-1]$. 
+\begin{itemize}
+\item All its variables are concrete: $\forall s_i$ and $\forall p\in
+\widehat{AP}_i$, $p$ is either true or false
+(not {\it unknown}).
+\item  $\sigma$ is a counter-example in  $\widehat{M}_i$: $s_0\not\models \Phi$.
+\item  $\sigma$ is not a path of the concrete system $M$: $\exists k$ such
+that $(s_{k}, s_{k+1}) \not\in R$.
 \end{definition}
 
 %\bigskip
 
-\begin{definition}
-\textbf{\emph{Spurious counterexample :}} \\
-\\
-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'}$.\\
-
-\smallskip
-
-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}.
-
-\end{definition}
-
-
-
-\subsection{Pre-processing and pertinency ordering of properties}
+%\begin{definition}
+%\textbf{\emph{Spurious counterexample :}} \\
+%\\
+%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'}$.\\
+%
+%\smallskip
+%
+%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}.
+%
+%\end{definition}
+
+
+
+\subsection{Ordering of properties}
 
 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$. 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}.
Index: papers/FDL2012/framework.tex
===================================================================
--- papers/FDL2012/framework.tex	(revision 55)
+++ papers/FDL2012/framework.tex	(revision 56)
@@ -5,5 +5,5 @@
 concrete model $M$, an abstraction of the concrete model $\widehat{M}$ is
 generated and tested in the model-checker. As the abstract model is an
-upper-approximation of the concrete model and we have restrained our
+over-approximation of the concrete model and we have restrained our
 verification to ACTL properties only, if $\Phi$ holds on the the abstract model then we are certain that it holds in the concrete model as well. 
 However, if $\Phi$ doesn't hold in the abstract model then we can't conclude anything regarding the concrete model until the counterexample, 
@@ -15,5 +15,5 @@
 %are CTL formulas with only universal path quantifiers: AX, AF, AG and AU.
 %\end{definition}
-\remark{Cecile}{remettre la dÃ©fintion du modÃšle concret}
+
 \begin{definition}
 Given $\widehat{M} = (\widehat{AP}, \widehat{S}, \widehat{S}_0, \widehat{L}, \widehat{R}, \widehat{F})$ an abstract model of a concrete model, $M$ and $\Phi$, a global property to be verified on $M$, the model-checking result can be interpreted as follows:
@@ -36,11 +36,54 @@
 \end{figure}
 
-As mention earlier, in our verification methodology, we have a concrete model which consists of several components and each component comes with its specification or more precisely, properties that hold in the component. Given a global property $\Phi$, the property to be verified by the composition of the concrete components model, an abstract model is generated by selecting some of the properties of the components which are relevant to $\varphi$. The generation of an abstract model in the form of AKS from CTL formulas, based on the works of Braunstein \cite{braunstein07ctl_abstraction}, has been successfully implemented by Bara \cite{bara08abs_composant}.
+As mention earlier, in our verification methodology, we have a concrete model which consists of several components and each component comes with its specification or more precisely, properties that hold in the component. Given a global property $\Phi$, the property to be verified by the composition of the concrete components model, an abstract model is generated by selecting some of the properties of the components which are relevant to $\varphi$. 
 
 In the case where model-checking failed, the counterexample given by the model-checker \cite{ucberkeley96vis}  has to be analysed. We use a SATSolver to check whether the counterexample is spurious or not. When a counterexample is proved to be spurious, we proceed to the refinement phase.
+\TODO{ref du papier sur le spurious + petite explication sur SAT et
+dÃ©roulement}
+\subsection{Concrete system definition}
 
-\subsection{Definition of the abstraction of a component and of the complete system}
+The concrete system is a synchronous compositon of components, each of which
+described as a Moore machine.
+\begin{definition}
+A \emph{Moore machine} $C$ is defined by a tuple $\langle I, O, R,$ $\delta, \lambda, \mathbf{R}_0 \rangle$, where,
+\begin{itemize}
+\item $I$ is a finite set of boolean inputs signals.
+\item $O$ is a finite set of boolean outputs signals.
+\item $R$ is a finite set of boolean sequential elements (registers).
+\item $\delta : 2^I \times 2^R \rightarrow 2^R$ is the transition function.
+\item $\lambda : 2^R \rightarrow 2^O$ is the output function.
+\item $\mathbf{R}_0 \subseteq 2^R$ is the set of initial states.
+\end{itemize}
+\end{definition}
 
-The abstraction of a component is represented by an Abstract Kripke Structure (AKS for short), derived from a subset of the CTL properties the component satisfies. Roughly speaking, AKS($\varphi$), the AKS derived from a CTL property $\varphi$, simulates all execution trees whose initial state satisfies $\varphi$. In AKS($\varphi$), states are tagged with the truth values of $\varphi$'s atomic propositions, among four truth values : inconsistent, false, true and unknown (or undefined). States with inconsistent truth values are not represented since they refer to non possible assignments of the atomic propositions. A set of fairness constraints eliminates non-progress cycles.
+\emph{States} (or configurations) of the circuit correspond to boolean configurations of all the sequential elements. From now on, let $C = \langle I, O, R, \delta, \lambda, \mathbf{R}_0 \rangle$ be a sequential circuit.
+
+\begin{definition}
+A \emph{Concrete system} $M$ is obtained by synchronous composition of the
+component.\\
+$M = C_1 \parallel C_2 \parallel \ldots \parallel C_n$,where each $C_i$ is a
+Moore machine with a specification associated $\varphi_i = \{\varphi_i^1 \ldots
+\varphi_i^k\}$ Each $\varphi_i^j$ being a CTL$\setminus$X formula whose
+propositions $AP$ belongs to $\{I_i\cup O_i\cup R_i\}$ .
+\end{definition}
+
+\subsection{Abstraction definition}
+
+Our abstraction consists in reducing the size of the representation model by
+freeing some its variables. The point is to determine the good set of variable
+to be freed and when to free them. We take advantage of the CTL specification
+of each component: a CTL property may be seen as a partial view of the tree of
+behaviors of its variables. All the variables not specified by the property
+can be freed. We introduced the Abstract Kripke Structure (AKS for short) which exactly
+specifies when the variable of the prperty can be frreed.
+The abstraction of a component is represented by an AKS, 
+derived from a subset of the CTL properties the component satisfies.
+Roughly speaking, AKS($\varphi$), the AKS derived from a CTL property
+$\varphi$, simulates all execution trees whose initial state satisfies
+$\varphi$. In AKS($\varphi$), states are tagged with the truth values of
+$\varphi$'s atomic propositions, among four truth values : inconsistent,
+false, true and unknown (either true or false).
+States with inconsistent truth values are not represented since they refer to non possible
+assignments of the atomic propositions. A set of fairness constraints eliminates non-progress cycles.
 
  
@@ -71,4 +114,7 @@
 
 As the abstract model $\widehat{M}$ is generated from the conjunction of verified properties of the components in the concrete model $M$, it can be seen as the composition of the AKS of each property.
+The AKS composition has been defined in \cite{these_braunstein}; it extends
+the classical synchrounous composition of Moore machine to deal with
+four-valued variables.
 %\bigskip
 
@@ -79,5 +125,4 @@
 \item{$ \widehat{C}_j = AKS (\varphi_{C_j^1}) ~||~ AKS (\varphi_{C_j^2} ) ~||~...~||~ AKS (\varphi_{C_j^k}) ~||$\\ $ ...~||~ AKS (\varphi_{C_j^m}) $}
 \item{$ \widehat{M} = \widehat{C}_1 ~||~ \widehat{C}_2 ~||~ ... ~||~ \widehat{C}_j ~||~... ~||~ \widehat{C}_n $}
-\item{$ V_{\widehat{C}_j} \subseteq V_{C_j}$ (with $V_{\widehat{C}_j}$ and $V_{C_j}$ are variables of $\widehat{C}_j$ and $C_j$ respectively.) TODO : LES V ICI NE SONT-ELLES PAS L'UNION DES AP DES $\varphi_{C_j^k}$ ???????}
 \end{itemize}
 
@@ -90,4 +135,7 @@
 
 
+The generation of an abstract model in the form of AKS from CTL formulas,
+based on the works of Braunstein \cite{braunstein07ctl_abstraction}, 
+has been successfully implemented by Bara \cite{bara08abs_composant}.
 
 
@@ -95,15 +143,27 @@
 TODO : PEUT ETRE A VENTILER DANS DIFFERENTES PARTIES ??
 
-1. Ordering of AKS
+\begin{definition}
+A state $s$ is an abstract state if one its variable $p$ is {\it unknown}. It
+is concise representation of the set of more concrete states in which $p$
+is either true or false. 
+\end{definition}
 
-Def : Concrete and abstract variables in AKS
+\begin{definition}
+The {\emph concretization} of an abstract $s$ with respect to the variable $p$
+({\it unknown} in that state), assigns either true or false to $p$.
 
-Def : Concretization of an abstract variable
+The {\emph abstraction} of a state $s$ with respect to the variable $p$
+(either true or false in that state), assigns  {\it unknown} to $p$.
+\end{definition}
 
-Def (dual) : Abstraction of a concrete variable
+\begin{property}
+Let A1 and A2 two AKS such that A2 is obtained by concretizing one abstract variable of A1 (resp A1 is obtained by abstracting one variable in A2). Then A1 simulates A2.
+\end{property}
+\begin{proof}
+As the concretization of state reduces the set of concrete configuration the
+abstract state represents but does not affect the transition relation of the
+AKS. The unroll execution tree of A2 is a subtree of the one of A1. Then  A1 simulates A2.
+\end{proof}
 
-Prop : Let A1 and A2 two AKS such that A2 is obtained by concretizing one abstract variable of A1 (resp A1 is obtained by abstracting one variable in A2). Then A1 simulates A2.
-
-A possible refinement : concretization of selected abstract variables. How to choose variables and instants of concretization : introduce new CTL properties. The question is : how to select pertinent CTL properties ???
  
 2. Negation of states in an AKS
