doc WhyML

parent e8a744d1
This diff is collapsed.
...@@ -10,7 +10,10 @@ They also provide extra features: ...@@ -10,7 +10,10 @@ They also provide extra features:
\begin{itemize} \begin{itemize}
\item \item
In a record type declaration, some fields can be declared In a record type declaration, some fields can be declared
\texttt{mutable}. \texttt{mutable} and/or \texttt{ghost}.
\item
In an algebraic type declaration (this includes record types), an
invariant can be specified.
\item \item
There are programming constructs with no counterpart in the logic: There are programming constructs with no counterpart in the logic:
\begin{itemize} \begin{itemize}
...@@ -19,6 +22,7 @@ They also provide extra features: ...@@ -19,6 +22,7 @@ They also provide extra features:
\item loops; \item loops;
\item exceptions; \item exceptions;
\item local and anonymous functions; \item local and anonymous functions;
\item ghost parameters and ghost code;
\item annotations: pre- and postconditions, assertions, loop invariants. \item annotations: pre- and postconditions, assertions, loop invariants.
\end{itemize} \end{itemize}
\item \item
...@@ -182,7 +186,7 @@ module MaxAndSum ...@@ -182,7 +186,7 @@ module MaxAndSum
end end
\end{whycode} \end{whycode}
\vspace*{-2em}\hrulefill \vspace*{-1em}%\hrulefill
\caption{Solution for VSTTE'10 competition problem 1.} \caption{Solution for VSTTE'10 competition problem 1.}
\label{fig:MaxAndSum} \label{fig:MaxAndSum}
\end{figure} \end{figure}
...@@ -298,7 +302,7 @@ module InvertingAnInjection ...@@ -298,7 +302,7 @@ module InvertingAnInjection
end end
\end{whycode} \end{whycode}
\vspace*{-2em}\hrulefill \vspace*{-1em}%\hrulefill
\caption{Solution for VSTTE'10 competition problem 2.} \caption{Solution for VSTTE'10 competition problem 2.}
\label{fig:Inverting} \label{fig:Inverting}
\end{figure} \end{figure}
...@@ -417,7 +421,7 @@ module SearchingALinkedList ...@@ -417,7 +421,7 @@ module SearchingALinkedList
end end
\end{whycode} \end{whycode}
\vspace*{-2em}\hrulefill \vspace*{-1em}%\hrulefill
\caption{Solution for VSTTE'10 competition problem 3.} \caption{Solution for VSTTE'10 competition problem 3.}
\label{fig:LinkedList} \label{fig:LinkedList}
\end{figure} \end{figure}
...@@ -582,7 +586,7 @@ module NQueens ...@@ -582,7 +586,7 @@ module NQueens
False False
end end
\end{whycode} \end{whycode}
\vspace*{-2em}\hrulefill \vspace*{-1em}%\hrulefill
\caption{Solution for VSTTE'10 competition problem 4 (1/2).} \caption{Solution for VSTTE'10 competition problem 4 (1/2).}
\label{fig:NQueens1} \label{fig:NQueens1}
\end{figure} \end{figure}
...@@ -728,7 +732,7 @@ automatically, including the verification of the lemmas themselves. ...@@ -728,7 +732,7 @@ automatically, including the verification of the lemmas themselves.
end end
\end{whycode} \end{whycode}
\vspace*{-2em}\hrulefill \vspace*{-1em}%\hrulefill
\caption{Solution for VSTTE'10 competition problem 4 (2/2).} \caption{Solution for VSTTE'10 competition problem 4 (2/2).}
\label{fig:NQueens2} \label{fig:NQueens2}
\end{figure} \end{figure}
...@@ -855,7 +859,7 @@ a one line code. ...@@ -855,7 +859,7 @@ a one line code.
\end{whycode} \end{whycode}
The code is given Figure~\ref{fig:AQueue}. The verification conditions The code is given Figure~\ref{fig:AQueue}. The verification conditions
are all discharged automatically. are all discharged automatically.
\begin{figure} \begin{figure}[p]
\centering \centering
\begin{whycode} \begin{whycode}
module AmortizedQueue module AmortizedQueue
...@@ -901,7 +905,7 @@ module AmortizedQueue ...@@ -901,7 +905,7 @@ module AmortizedQueue
= create q.front q.lenf (Cons x q.rear) (q.lenr + 1) = create q.front q.lenf (Cons x q.rear) (q.lenr + 1)
end end
\end{whycode} \end{whycode}
\vspace*{-2em}\hrulefill \vspace*{-1em}%\hrulefill
\caption{Solution for VSTTE'10 competition problem 5.} \caption{Solution for VSTTE'10 competition problem 5.}
\label{fig:AQueue} \label{fig:AQueue}
\end{figure} \end{figure}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment