@@ -26,7 +26,7 @@ Elements of $\SigAx$ are ranged over by $\sigax$.
\subsection{Grammar}\label{sec:grammar}
\paragraph{Syntax.}
Iris syntax is built up from a signature $\Sig$ and a countably infinite set $\textdom{Var}$ of variables (ranged over by metavariables $x$, $y$, $z$).
Iris syntax is built up from a signature $\Sig$ and a countably infinite set $\Var$ of variables (ranged over by metavariables $\var$, $\varB$, $\varC$).
Below, $\melt$ ranges over $\monoid$ and $i$ ranges over $\set{1,2}$.
% We write $x \fgmapsto v$ for $\exists q.\; x \fgmapsto[q] v$ and $x \gmapsto v$ for $x \fgmapsto[1] v$.
% Note that $x \fgmapsto v$ is duplicable but cannot be boxed (as it depends on resources); \ie we have $x \fgmapsto v \Lra x \fgmapsto v * x \fgmapsto v$ but not $x \fgmapsto v \Ra \always x \fgmapsto v$.
% To implement this interface, allocate an instance $\gname_G$ of $\FHeap(\textdom{Val})$ and define
% To implement this interface, allocate an instance $\gname_G$ of $\FHeap(\Val)$ and define
A \emph{language}$\Lang$ consists of a set \textdom{Expr} of \emph{expressions} (metavariable $\expr$), a set \textdom{Val} of \emph{values} (metavariable $\val$), and a set \textdom{State} of \emph{states} (metvariable $\state$) such that
A \emph{language}$\Lang$ consists of a set \Expr{} of \emph{expressions} (metavariable $\expr$), a set \Val{} of \emph{values} (metavariable $\val$), and a set \State of \emph{states} (metavariable $\state$) such that
\begin{itemize}
\item There exist functions $\ofval : \textdom{Val}\to\textdom{Expr}$ and $\toval : \textdom{Expr}\pfn\textdom{val}$ (notice the latter is partial), such that
\item There exists a \emph{primitive reduction relation}\[(-,-\step-,-,-)\subseteq\textdom{Expr}\times\textdom{State}\times\textdom{Expr}\times\textdom{State}\times(\cup_n \textdom{Expr}^n)\]
\item There exists a \emph{primitive reduction relation}\[(-,-\step-,-,-)\subseteq\Expr\times\State\times\Expr\times\State\times(\cup_n \Expr^n)\]
A reduction $\expr_1, \state_1\step\expr_2, \state_2, \overline\expr$ indicates that, when $\expr_1$ reduces to $\expr_2$, the new threads in the list $\overline\expr$ is forked off.
We will write $\expr_1, \state_1\step\expr_2, \state_2$ for $\expr_1, \state_1\step\expr_2, \state_2, ()$, \ie when no threads are forked off. \\
\item All values are stuck:
...
...
@@ -26,7 +28,7 @@ A \emph{language} $\Lang$ consists of a set \textdom{Expr} of \emph{expressions}
\end{defn}
\begin{defn}[Context]
A function $\lctx : \textdom{Expr}\to\textdom{Expr}$ is a \emph{context} if the following conditions are satisfied:
A function $\lctx : \Expr\to\Expr$ is a \emph{context} if the following conditions are satisfied:
\begin{enumerate}[itemsep=0pt]
\item$\lctx$ does not turn non-values into values:\\
\textmon{Inv}\eqdef{}&\authm(\mathbb N \fpfn\agm(\latert\iPreProp)) \\
\textmon{En}\eqdef{}&\pset{\mathbb N}\\
\textmon{Dis}\eqdef{}&\finpset{\mathbb N}
...
...
@@ -249,10 +249,10 @@ The purpose of the adequacy statement is to show that our notion of weakest prec
There are two properties we are looking for: First of all, the postcondition should reflect actual properties of the values the program can terminate with.
Second, a proof of a weakest precondition with any postcondition should imply that the program is \emph{safe}, \ie that it does not get stuck.
To express the adequacy statement for functional correctness, we assume we are given some set $V \in\textdom{Val}$ of legal return values.
To express the adequacy statement for functional correctness, we assume we are given some set $V \subseteq\Val$ of legal return values.
Furthermore, we assume that the signature $\Sig$ adds a predicate $\pred$ to the logic which reflects $V$ into the logic: