Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iInstr on load with persistent points-to #8

Open
Armael opened this issue Aug 9, 2021 · 0 comments
Open

iInstr on load with persistent points-to #8

Armael opened this issue Aug 9, 2021 · 0 comments

Comments

@Armael
Copy link
Collaborator

Armael commented Aug 9, 2021

Currently it requires manually moving the persistent points-to from the persistent context to the spatial context, then back after iInstr.
Solving the issue requires:

  • the following patch to proofmode.v
@@ -317,13 +322,29 @@ Qed.
 Class EnvsLookupSpatial {PROP: bi} (Δ: envs PROP) (P: PROP) (i: ident) := {}.
 #[export] Hint Mode EnvsLookupSpatial + ! ! - : typeclass_instances.

-Instance EnvsLookupSpatial_here (PROP: bi) (Γp Γs: env PROP) P c i :
-  EnvsLookupSpatial (Envs Γp (Esnoc Γs i P) c) P i.
+Class EnvsLookupIntuitionistic {PROP: bi} (Δ: envs PROP) (P: PROP) (i: ident) := {}.
+#[export] Hint Mode EnvsLookupIntuitionistic + ! ! - : typeclass_instances.
+
+Class EnvLookup {PROP: bi} (Γ: env PROP) (P: PROP) (i: ident) := {}.
+#[export] Hint Mode EnvLookup + ! ! - : typeclass_instances.
+
+Instance EnvsLookupSpatial_default (PROP: bi) (Γp Γs: env PROP) P c i :
+  EnvLookup Γs P i →
+  EnvsLookupSpatial (Envs Γp Γs c) P i.
+Qed.
+
+Instance EnvsLookupIntuitionistic_default (PROP: bi) (Γp Γs: env PROP) P c i :
+  EnvLookup Γp P i →
+  EnvsLookupIntuitionistic (Envs Γp Γs c) P i.
+Qed.
+
+Instance EnvLookup_here (PROP: bi) (Γ: env PROP) P i :
+  EnvLookup (Esnoc Γ i P) P i.
 Qed.

-Instance EnvsLookupSpatial_next (PROP: bi) (Γp Γs: env PROP) P Q c i j :
-  EnvsLookupSpatial (Envs Γp Γs c) Q j →
-  EnvsLookupSpatial (Envs Γp (Esnoc Γs i P) c) Q j.
+Instance EnvLookup_next (PROP: bi) (Γ: env PROP) P Q i j :
+  EnvLookup Γ Q j →
+  EnvLookup (Esnoc Γ i P) Q j.
 Qed.

 Class FramableMachineResource {Σ: gFunctors} (P: iProp Σ) := {}.
@@ -358,7 +379,7 @@ Class FramableMachineHyp {Σ} (Δ: envs (uPredI (iResUR Σ))) (G: iProp Σ) (i:
 #[export] Hint Mode FramableMachineHyp + ! ! - : typeclass_instances.
 Instance FramableMachineHyp_default Σ (Δ: envs (uPredI (iResUR Σ))) G P i:
   LookupFramableMachineResource G P →
-  EnvsLookupSpatial Δ P i →
+  TCOr (EnvsLookupSpatial Δ P i) (EnvsLookupIntuitionistic Δ P i) →
   FramableMachineHyp Δ G i.
 Qed.
  • understanding how to deal with the fact that iNamed currently fails when trying to intro a (persistent) fact "H" when there is already one in the persistent context. -> Contact Tej?.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant