Theory RB
theory RB
imports LTS ArcExt SubExt
begin
section ‹Red-Black Graphs›
text ‹In this section we define red\hyp{}black graphs and the five operators that perform over
them. Then, we state and prove a number of intermediate lemmas about red\hyp{}black graphs
built using only these five operators, in other words: invariants about our method of transformation
of red\hyp{}black graphs.
Then, we define the notion of red\hyp{}black paths and state and prove the main properties of our
method, namely its correctness and the fact that it preserves the set of feasible paths of the
program under analysis.›
subsection ‹Basic Definitions›
subsubsection ‹The type of Red-Black Graphs›
text ‹We represent red-black graph with the following record. We detail its fields:
\begin{itemize}
\item @{term "red"} is the red graph, called \emph{red part}, which represents the unfolding of
the black part. Its vertices are indexed black vertices,
\item @{term "black"} is the original LTS, the \emph{black part},
\item @{term "subs"} is the subsumption relation over the vertices of @{term "red"},
\item @{term "init_conf"} is the initial configuration,
\item @{term "confs"} is a function associating configurations to the vertices of @{term "red"},
\item @{term "marked"} is a function associating truth values to the vertices of @{term "red"}.
We use it to represent the fact that a particular configuration (associated to a red location) is
known to be unsatisfiable,
\item @{term "strengthenings"} is a function associating boolean expressions over program
variables to vertices of the red graph. Those boolean expressions can be seen as invariants that
the configuration associated to the ``strengthened'' red vertex has to model.
\end{itemize}
We are only interested by red-black graphs obtained by the inductive relation
@{term "RedBlack"}. From now on, we call ``red-black graphs" the @{term pre_RedBlack}'s
obtained by @{term "RedBlack"} and ``pre-red-black graphs" all other ones.›