Commit 75c165b2 authored by Robbert Krebbers's avatar Robbert Krebbers

Rename persistent → intuitionistic for proofmode internals/error messages.

parent ae327e1f
......@@ -601,7 +601,7 @@ with the exception of:
- [FromAssumption] used by [iAssumption]
- [Frame] and [MaybeFrame] used by [iFrame]
- [MaybeIntoLaterN] and [FromLaterN] used by [iNext]
- [IntoPersistent] used by [iPersistent]
- [IntoPersistent] used by [iIntuitionistic]
*)
Instance into_pure_tc_opaque {PROP : bi} (P : PROP) φ :
IntoPure P φ IntoPure (tc_opaque P) φ := id.
......
This diff is collapsed.
......@@ -255,29 +255,29 @@ Definition envs_lookup {PROP} (i : ident) (Δ : envs PROP) : option (bool * PROP
| None => P env_lookup i Γs; Some (false, P)
end.
Definition envs_delete {PROP} (remove_persistent : bool)
Definition envs_delete {PROP} (remove_intuitionistic : bool)
(i : ident) (p : bool) (Δ : envs PROP) : envs PROP :=
let (Γp,Γs,n) := Δ in
match p with
| true => Envs (if remove_persistent then env_delete i Γp else Γp) Γs n
| true => Envs (if remove_intuitionistic then env_delete i Γp else Γp) Γs n
| false => Envs Γp (env_delete i Γs) n
end.
Definition envs_lookup_delete {PROP} (remove_persistent : bool)
Definition envs_lookup_delete {PROP} (remove_intuitionistic : bool)
(i : ident) (Δ : envs PROP) : option (bool * PROP * envs PROP) :=
let (Γp,Γs,n) := Δ in
match env_lookup_delete i Γp with
| Some (P,Γp') => Some (true, P, Envs (if remove_persistent then Γp' else Γp) Γs n)
| Some (P,Γp') => Some (true, P, Envs (if remove_intuitionistic then Γp' else Γp) Γs n)
| None => ''(P,Γs') env_lookup_delete i Γs; Some (false, P, Envs Γp Γs' n)
end.
Fixpoint envs_lookup_delete_list {PROP} (remove_persistent : bool)
Fixpoint envs_lookup_delete_list {PROP} (remove_intuitionistic : bool)
(js : list ident) (Δ : envs PROP) : option (bool * list PROP * envs PROP) :=
match js with
| [] => Some (true, [], Δ)
| j :: js =>
''(p,P,Δ') envs_lookup_delete remove_persistent j Δ;
''(q,Ps,Δ'') envs_lookup_delete_list remove_persistent js Δ';
''(p,P,Δ') envs_lookup_delete remove_intuitionistic j Δ;
''(q,Ps,Δ'') envs_lookup_delete_list remove_intuitionistic js Δ';
Some ((p:bool) && q, P :: Ps, Δ'')
end.
......@@ -313,7 +313,7 @@ Definition env_spatial_is_nil {PROP} (Δ : envs PROP) : bool :=
Definition envs_clear_spatial {PROP} (Δ : envs PROP) : envs PROP :=
Envs (env_intuitionistic Δ) Enil (env_counter Δ).
Definition envs_clear_persistent {PROP} (Δ : envs PROP) : envs PROP :=
Definition envs_clear_intuitionistic {PROP} (Δ : envs PROP) : envs PROP :=
Envs Enil (env_spatial Δ) (env_counter Δ).
Definition envs_incr_counter {PROP} (Δ : envs PROP) : envs PROP :=
......@@ -396,7 +396,7 @@ Global Instance envs_entails_flip_mono :
Proper (envs_Forall2 () ==> flip () ==> flip impl) (@envs_entails PROP).
Proof. rewrite envs_entails_eq=> Δ1 Δ2 ? P1 P2 <- <-. by f_equiv. Qed.
Lemma envs_delete_persistent Δ i : envs_delete false i true Δ = Δ.
Lemma envs_delete_intuitionistic Δ i : envs_delete false i true Δ = Δ.
Proof. by destruct Δ. Qed.
Lemma envs_delete_spatial Δ i :
envs_delete false i false Δ = envs_delete true i false Δ.
......@@ -433,7 +433,7 @@ Lemma envs_lookup_sound Δ i p P :
envs_lookup i Δ = Some (p,P)
of_envs Δ ?p P of_envs (envs_delete true i p Δ).
Proof. apply envs_lookup_sound'. Qed.
Lemma envs_lookup_persistent_sound Δ i P :
Lemma envs_lookup_intuitionistic_sound Δ i P :
envs_lookup i Δ = Some (true,P) of_envs Δ P of_envs Δ.
Proof. intros ?%(envs_lookup_sound' _ false). by destruct Δ. Qed.
Lemma envs_lookup_sound_2 Δ i p P :
......
......@@ -100,11 +100,11 @@ with parse_clear (ts : list token) (k : stack) : option stack :=
match ts with
| TFrame :: TName s :: ts => parse_clear ts (StPat (IClearFrame (SelIdent s)) :: k)
| TFrame :: TPure :: ts => parse_clear ts (StPat (IClearFrame SelPure) :: k)
| TFrame :: TAlways :: ts => parse_clear ts (StPat (IClearFrame SelPersistent) :: k)
| TFrame :: TAlways :: ts => parse_clear ts (StPat (IClearFrame SelIntuitionistic) :: k)
| TFrame :: TSep :: ts => parse_clear ts (StPat (IClearFrame SelSpatial) :: k)
| TName s :: ts => parse_clear ts (StPat (IClear (SelIdent s)) :: k)
| TPure :: ts => parse_clear ts (StPat (IClear SelPure) :: k)
| TAlways :: ts => parse_clear ts (StPat (IClear SelPersistent) :: k)
| TAlways :: ts => parse_clear ts (StPat (IClear SelIntuitionistic) :: k)
| TSep :: ts => parse_clear ts (StPat (IClear SelSpatial) :: k)
| TBraceR :: ts => parse_go ts k
| _ => None
......@@ -148,25 +148,25 @@ Ltac parse_one s :=
end.
End intro_pat.
Fixpoint intro_pat_persistent (p : intro_pat) :=
Fixpoint intro_pat_intuitionistic (p : intro_pat) :=
match p with
| IPureElim => true
| IAlwaysElim _ => true
| IList pps => forallb (forallb intro_pat_persistent) pps
| IList pps => forallb (forallb intro_pat_intuitionistic) pps
| ISimpl => true
| IClear _ => true
| IClearFrame _ => true
| _ => false
end.
Ltac intro_pat_persistent p :=
Ltac intro_pat_intuitionistic p :=
lazymatch type of p with
| intro_pat => eval cbv in (intro_pat_persistent p)
| list intro_pat => eval cbv in (forallb intro_pat_persistent p)
| intro_pat => eval cbv in (intro_pat_intuitionistic p)
| list intro_pat => eval cbv in (forallb intro_pat_intuitionistic p)
| string =>
let pat := intro_pat.parse p in
eval cbv in (forallb intro_pat_persistent pat)
eval cbv in (forallb intro_pat_intuitionistic pat)
| ident => false
| bool => p
| ?X => fail "intro_pat_persistent:" p "has unexpected type" X
| ?X => fail "intro_pat_intuitionistic:" p "has unexpected type" X
end.
This diff is collapsed.
......@@ -12,7 +12,7 @@ Declare Reduction pm_eval := cbv [
env_dom env_intuitionistic env_spatial env_counter env_spatial_is_nil envs_dom
envs_lookup envs_lookup_delete envs_delete envs_snoc envs_app
envs_simple_replace envs_replace envs_split
envs_clear_spatial envs_clear_persistent envs_incr_counter
envs_clear_spatial envs_clear_intuitionistic envs_incr_counter
envs_split_go envs_split env_to_prop
(* PM option combinators *)
pm_option_bind pm_from_option pm_option_fun
......
......@@ -4,7 +4,7 @@ Set Default Proof Using "Type".
Inductive sel_pat :=
| SelPure
| SelPersistent
| SelIntuitionistic
| SelSpatial
| SelIdent : ident sel_pat.
......@@ -21,7 +21,7 @@ Fixpoint parse_go (ts : list token) (k : list sel_pat) : option (list sel_pat) :
| [] => Some (reverse k)
| TName s :: ts => parse_go ts (SelIdent s :: k)
| TPure :: ts => parse_go ts (SelPure :: k)
| TAlways :: ts => parse_go ts (SelPersistent :: k)
| TAlways :: ts => parse_go ts (SelIntuitionistic :: k)
| TSep :: ts => parse_go ts (SelSpatial :: k)
| _ => None
end.
......
......@@ -2,7 +2,7 @@ From stdpp Require Export strings.
From iris.proofmode Require Import base tokens.
Set Default Proof Using "Type".
Inductive goal_kind := GSpatial | GModal | GPersistent.
Inductive goal_kind := GSpatial | GModal | GIntuitionistic.
Record spec_goal := SpecGoal {
spec_goal_kind : goal_kind;
......@@ -38,14 +38,14 @@ Fixpoint parse_go (ts : list token) (k : list spec_pat) : option (list spec_pat)
| [] => Some (reverse k)
| TName s :: ts => parse_go ts (SIdent s :: k)
| TBracketL :: TAlways :: TFrame :: TBracketR :: ts =>
parse_go ts (SAutoFrame GPersistent :: k)
parse_go ts (SAutoFrame GIntuitionistic :: k)
| TBracketL :: TFrame :: TBracketR :: ts =>
parse_go ts (SAutoFrame GSpatial :: k)
| TBracketL :: TModal :: TFrame :: TBracketR :: ts =>
parse_go ts (SAutoFrame GModal :: k)
| TBracketL :: TPure :: TBracketR :: ts => parse_go ts (SPureGoal false :: k)
| TBracketL :: TPure :: TDone :: TBracketR :: ts => parse_go ts (SPureGoal true :: k)
| TBracketL :: TAlways :: ts => parse_goal ts GPersistent false [] [] k
| TBracketL :: TAlways :: ts => parse_goal ts GIntuitionistic false [] [] k
| TBracketL :: TModal :: ts => parse_goal ts GModal false [] [] k
| TBracketL :: ts => parse_goal ts GSpatial false [] [] k
| TForall :: ts => parse_go ts (SForall :: k)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment