Section protocols.
Class protocol {state : Type} (Iread Ifull : state -> Z -> mpred) :=
{ full_read s v : Ifull s v |-- |==> Ifull s v * Iread s v; read_dup s v : duplicable (Iread s v) }.
Global Instance dup_protocol {state} (T : state -> Z -> mpred) (Ht : forall s v, duplicable (T s v)) :
protocol T T.
Context {state : Type}.
Parameter protocol_A : val -> state -> (state -> state -> Prop) ->
((state -> Z -> mpred) * (state -> Z -> mpred)) -> mpred.
Context (ord : state -> state -> Prop) `{RelationClasses.PreOrder _ ord}
(Tread Tfull : state -> Z -> mpred).
Notation T := (Tread, Tfull).

Axiom make_protocol : forall {P : protocol Tread Tfull} sh l v s,
writable_share sh -> repable_signed v ->
data_at sh tint (vint v) l * |> Tfull s v |-- |==> protocol_A l s ord T.