@@ -91,7 +91,7 @@ Crucially, the second rule allows us to \emph{swap} the ``side'' of the sum that
...
@@ -91,7 +91,7 @@ Crucially, the second rule allows us to \emph{swap} the ``side'' of the sum that
\subsection{Finite partial function}
\subsection{Finite partial function}
\label{sec:fpfnm}
\label{sec:fpfnm}
Given some countable $K$ and some CMRA $\monoid$, the set of finite partial functions $K \fpfn\monoid$ is equipped with a COFE and CMRA structure by lifting everything pointwise.
Given some infinite countable $K$ and some CMRA $\monoid$, the set of finite partial functions $K \fpfn\monoid$ is equipped with a COFE and CMRA structure by lifting everything pointwise.
We obtain the following frame-preserving updates:
We obtain the following frame-preserving updates:
\begin{mathpar}
\begin{mathpar}
...
@@ -149,7 +149,7 @@ There are no interesting frame-preserving updates for $\agm(\cofe)$, but we can
...
@@ -149,7 +149,7 @@ There are no interesting frame-preserving updates for $\agm(\cofe)$, but we can
\subsection{Exclusive CMRA}
\subsection{Exclusive CMRA}
Given a cofe$\cofe$, we define a CMRA $\exm(\cofe)$ such that at most one $x \in\cofe$ can be owned:
Given a COFE$\cofe$, we define a CMRA $\exm(\cofe)$ such that at most one $x \in\cofe$ can be owned:
@@ -375,7 +375,7 @@ We obtain the following frame-preserving update:
...
@@ -375,7 +375,7 @@ We obtain the following frame-preserving update:
\subsection{STS with tokens}
\subsection{STS with tokens}
\label{sec:stsmon}
\label{sec:stsmon}
Given a state-transition system~(STS, \ie a directed graph) $(\STSS, {\stsstep}\subseteq\STSS\times\STSS)$, a set of tokens $\STST$, and a labeling $\STSL: \STSS\ra\wp(\STST)$ of \emph{protocol-owned} tokens for each state, we construct a monoid modeling an authoritative current state and permitting transitions given a \emph{bound} on the current state and a set of \emph{locally-owned} tokens.
Given a state-transition system~(STS, \ie a directed graph) $(\STSS, {\stsstep}\subseteq\STSS\times\STSS)$, a set of tokens $\STST$, and a labeling $\STSL: \STSS\ra\wp(\STST)$ of \emph{protocol-owned} tokens for each state, we construct an RA modeling an authoritative current state and permitting transitions given a \emph{bound} on the current state and a set of \emph{locally-owned} tokens.
The construction follows the idea of STSs as described in CaReSL \cite{caresl}.
The construction follows the idea of STSs as described in CaReSL \cite{caresl}.
We first lift the transition relation to $\STSS\times\wp(\STST)$ (implementing a \emph{law of token conservation}) and define a stepping relation for the \emph{frame} of a given token set:
We first lift the transition relation to $\STSS\times\wp(\STST)$ (implementing a \emph{law of token conservation}) and define a stepping relation for the \emph{frame} of a given token set:
@@ -7,7 +7,7 @@ A \emph{language} $\Lang$ consists of a set \textdom{Expr} of \emph{expressions}
...
@@ -7,7 +7,7 @@ A \emph{language} $\Lang$ consists of a set \textdom{Expr} of \emph{expressions}
\end{mathpar}
\end{mathpar}
\item There exists a \emph{primitive reduction relation}\[(-,-\step-,-,-)\subseteq\textdom{Expr}\times\textdom{State}\times\textdom{Expr}\times\textdom{State}\times(\textdom{Expr}\uplus\set{\bot})\]
\item There exists a \emph{primitive reduction relation}\[(-,-\step-,-,-)\subseteq\textdom{Expr}\times\textdom{State}\times\textdom{Expr}\times\textdom{State}\times(\textdom{Expr}\uplus\set{\bot})\]
We will write $\expr_1, \state_1\step\expr_2, \state_2$ for $\expr_1, \state_1\step\expr_2, \state_2, \bot$. \\
We will write $\expr_1, \state_1\step\expr_2, \state_2$ for $\expr_1, \state_1\step\expr_2, \state_2, \bot$. \\
A reduction $\expr_1, \state_1\step\expr_2, \state_2, \expr_\f$ indicates that, when $\expr_1$ reduces to $\expr$, a \emph{new thread}$\expr_\f$ is forked off.
A reduction $\expr_1, \state_1\step\expr_2, \state_2, \expr_\f$ indicates that, when $\expr_1$ reduces to $\expr_2$, a \emph{new thread}$\expr_\f$ is forked off.
\item All values are stuck:
\item All values are stuck:
\[\expr, \_\step\_, \_, \_\Ra\toval(\expr)=\bot\]
\[\expr, \_\step\_, \_, \_\Ra\toval(\expr)=\bot\]
\end{itemize}
\end{itemize}
...
@@ -40,7 +40,7 @@ For any language $\Lang$, we define the corresponding thread-pool semantics.
...
@@ -40,7 +40,7 @@ For any language $\Lang$, we define the corresponding thread-pool semantics.
Notice that primitive view shifts cover everything to their right, \ie$\pvs\prop*\propB\eqdef\pvs(\prop*\propB)$.
Here we define $\wpre{\expr_\f}[\mask]{\Ret\var.\prop}\eqdef\TRUE$ if $\expr_\f=\bot$ (remember that our stepping relation can, but does not have to, define a forked-off expression).
Here we define $\wpre{\expr_\f}[\mask]{\Ret\var.\prop}\eqdef\TRUE$ if $\expr_\f=\bot$ (remember that our stepping relation can, but does not have to, define a forked-off expression).