diff --git a/docs/constructions.tex b/docs/constructions.tex index 7a08fa78cc0dfe9b33b1cd51b6efa8360037f6c1..b780efec9492753c539a8c801dd2022465ab7a10 100644 --- a/docs/constructions.tex +++ b/docs/constructions.tex @@ -32,6 +32,36 @@ There are no interesting frame-preserving updates for $\agm(\cofe)$, but we can \axiomH{ag-agree}{\ag(x) \mtimes \ag(y) \in \mval_n \Ra x \nequiv{n} y} \end{mathpar} +\subsection{One-shot} + +The purpose of the one-shot CMRA is to lazily initialize the state of a ghost location. +Given some CMRA $\monoid$, we define $\oneshotm(\monoid)$ as follows: +\begin{align*} + \monoid \eqdef{}& \ospending + \osshot(\monoid) + \munit + \bot \\ + \mval_n \eqdef{}& \set{\ospending, \munit} \cup \setComp{\osshot(\melt)}{\melt \in \mval_n} +\end{align*} +\begin{align*} + \mcore{\ospending} \eqdef{}& \munit & \mcore{\osshot(\melt)} \eqdef{}& \mcore\melt \\ + \mcore{\munit} \eqdef{}& \munit & \mcore{\bot} \eqdef{}& \bot +\end{align*} +\begin{align*} + \osshot(\melt) \mtimes \osshot(\meltB) \eqdef{}& \osshot(\melt \mtimes \meltB) \\ + \munit \mtimes \ospending \eqdef{}& \ospending \mtimes \munit \eqdef \ospending \\ + \munit \mtimes \osshot(\melt) \eqdef{}& \osshot(\melt) \mtimes \munit \eqdef \osshot(\melt) +\end{align*} +The remaining cases of composition go to $\bot$. +The step-indexed equivalence is inductively defined as follows: +\begin{mathpar} + \axiom{\ospending \nequiv{n} \ospending} + + \infer{\melt \nequiv{n} \meltB}{\osshot(\melt) \nequiv{n} \osshot(\meltB)} + + \axiom{\munit \nequiv{n} \munit} + + \axiom{\bot \nequiv{n} \bot} +\end{mathpar} +$\oneshotm(-)$ is a locally non-expansive bifunctor from $\CMRAs$ to $\CMRAs$. + % \subsection{Exclusive monoid} diff --git a/docs/iris.sty b/docs/iris.sty index 0c73ddd2701dde561b4ef626deb4e9ab947e9921..7692ff23597e2893b91238c3a10e5b3be4456db2 100644 --- a/docs/iris.sty +++ b/docs/iris.sty @@ -335,7 +335,12 @@ \newcommand{\AuthInv}{\textsf{AuthInv}} \newcommand{\Auth}{\textsf{Auth}} -%% STSs +% One-Shot +\newcommand{\oneshotm}{\ensuremath{\textmon{OneShot}}} +\newcommand{\ospending}{\textlog{pending}} +\newcommand{\osshot}{\textlog{shot}} + +% STSs \newcommand{\STSCtx}{\textlog{StsCtx}} \newcommand{\STSSt}{\textlog{StsSt}} \newcommand{\STSS}{\mathcal{S}} % states