@@ -156,21 +156,21 @@ Finally, we can define the core piece of the program logic, the proposition that
\paragraph{Defining weakest precondition.}
We assume that everything making up the definition of the language, \ie values, expressions, states, the conversion functions, reduction relation and all their properties, are suitably reflected into the logic (\ie they are part of the signature $\Sig$).
We further assume (as a parameter) a predicate $\stateinterp : \State\to\iProp$ that interprets the physical state as an Iris proposition.
We further assume (as a parameter) a predicate $\stateinterp : \State\times\mathbb N \to\iProp$ that interprets the machine state as an Iris proposition, and a predicate $\pred_F: \Val\to\iProp$ that serves as postcondition for forked-of threads.
The state interpretation can depend on the current physical state as well as the total number of \emph{forked} threads (that is one less that the total number of threads).
This can be instantiated, for example, with ownership of an authoritative RA to tie the physical state to fragments that are used for user-level proofs.
Finally, weakest precondition takes a parameter $\stuckness\in\set{\NotStuck, \MaybeStuck}$ indicating whether program execution is allowed to get stuck.
The $\stateinterp$ will always be set by the context; typically, when instantiating Iris with a language, we also pick the corresponding state interpretation $\stateinterp$.
All proof rules leave $\stateinterp$ unchanged.
The $\stateinterp$and $\pred_F$will always be set by the context; typically, when instantiating Iris with a language, we also pick the corresponding state interpretation $\stateinterp$ and fork-postcondition $\pred_F$.
All proof rules leave $\stateinterp$and $\pred_F$unchanged.
If we leave away the mask $\mask$, we assume it to default to $\top$.
If we leave away the stuckness $\stuckness$, it defaults to $\NotStuck$.
...
...
@@ -213,7 +213,10 @@ We will also want a rule that connect weakest preconditions to the operational s
\infer[wp-lift-step]
{\toval(\expr_1) = \bot}
{{\begin{inbox}% for some crazy reason, LaTeX is actually sensitive to the space between the "{ {" here and the "} }" below...
Notice that the state invariant $S$ used by the weakest precondition is chosen \emph{after} doing a fancy update, which allows it to depend on the names of ghost variables that are picked in that initial fancy update.
The following variant of adequacy also allows exploiting the second parameter of $\stateinterp$, the number of threads, but only applies when \emph{all} threads have reduced to a value: