iris.v 1.11 KB
Newer Older
1 2 3 4 5
From iris.program_logic Require Export ghost_ownership language.
From iris.prelude Require Export coPset.
From iris.algebra Require Import gmap auth agree gset coPset upred_big_op.

Class irisPreG (Λ : language) (Σ : gFunctors) : Set := IrisPreG {
6 7 8 9
  state_inG :> inG Σ (authR (optionUR (exclR (stateC Λ))));
  invariant_inG :> inG Σ (authR (gmapUR positive (agreeR (laterC (iPreProp Σ)))));
  enabled_inG :> inG Σ coPset_disjR;
  disabled_inG :> inG Σ (gset_disjR positive);
10 11 12 13 14 15 16 17 18 19
}.

Class irisG (Λ : language) (Σ : gFunctors) : Set := IrisG {
  iris_pre_inG :> irisPreG Λ Σ;
  state_name : gname;
  invariant_name : gname;
  enabled_name : gname;
  disabled_name : gname;
}.

20 21 22 23 24
Definition irisΣ (Λ : language) : gFunctors :=
  #[GFunctor (constRF (authUR (optionUR (exclR (stateC Λ)))));
    GFunctor (authRF (gmapURF positive (agreeRF (laterCF idCF))));
    GFunctor (constRF coPset_disjUR);
    GFunctor (constRF (gset_disjUR positive))].
25

26
Instance subG_irisΣ {Σ Λ} : subG (irisΣ Λ) Σ  irisPreG Λ Σ.
27
Proof.
28 29 30
  intros [?%subG_inG [?%subG_inG
    [?%subG_inG ?%subG_inG]%subG_inv]%subG_inv]%subG_inv; by constructor.
Qed.