fact stringlengths 6 1.53k | type stringclasses 16
values | library stringclasses 5
values | imports listlengths 1 79 | filename stringclasses 205
values | symbolic_name stringlengths 1 55 | docstring stringclasses 1
value |
|---|---|---|---|---|---|---|
change_to_fille :=
reshape_expr e ltac:(fun K e' => | Ltac | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | change_to_fill | |
step_ctx:=
lazymatch goal with
| |- rtc erased_step (?e :: _, _) _ =>
change_to_fill e;
step by (apply fill_erased_steps; eauto)
end. | Ltac | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | step_ctx | |
step_atomic:=
step by (apply atomic_step; eauto using base_step);
try reflexivity. | Ltac | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | step_atomic | |
state_wf_init_alloc(v0 : val) (s : interp_state) (n : Z) :
(0 ≤ n)%Z →
state_wf s →
state_wf
(modify_lang_state
(λ σ : state, state_init_heap {| loc_car := next_loc s |} n v0 σ)
(interp_state_alloc n s)).
Proof.
intros Hn.
constructor; rewrite /modify_lang_state /interp_s... | Lemma | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | state_wf_init_alloc | |
state_wf_same_doms f :
(dom (f s.(lang_state)).(heap) = dom s.(lang_state).(heap)) →
state_wf s →
state_wf (modify_lang_state f s).
Proof.
intros Hdom_eq Hwf.
constructor; rewrite /modify_lang_state /= => l ?.
apply (fin_map_dom.not_elem_of_dom (D:=gset loc)).
rewrite Hdom_eq.
apply fi... | Lemma | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | state_wf_same_dom | |
state_wf_upds l mv0 v' :
state_wf s →
heap (lang_state s) !! l = Some mv0 →
state_wf (modify_lang_state (λ σ : state, state_upd_heap <[l:=v']> σ) s).
Proof.
intros Hwf Heq.
apply state_wf_same_dom; auto.
rewrite fin_map_dom.dom_insert_L.
apply (fin_map_dom.elem_of_dom_2 (D:=gset loc)) in H... | Lemma | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | state_wf_upd | |
interpret_wffuel (e: expr) s v s' :
state_wf s →
interpret fuel e s = (inl v, s') →
state_wf s'.
Proof.
revert e s v s'.
induction fuel as [|fuel]; simpl; intros e s v s' **; [ errored | ].
destruct e; try errored; success; eauto;
(repeat case_match; subst; try errored;
success;
... | Lemma | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | interpret_wf | |
HintResolve interpret_wf : core. | Local | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | Hint | |
interpret_soundfuel e s v s' :
state_wf s →
interpret fuel e s = (inl v, s') →
rtc erased_step (e :: s.(forked_threads), s.(lang_state)) (Val v :: s'.(forked_threads), s'.(lang_state)).
Proof.
revert e s v s'.
induction fuel as [|fuel]; simpl; intros e s v s' **; [ errored | ].
destruct e; try... | Lemma | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | interpret_sound | |
eventually_stuck(e: expr) tp σ tp' σ' :=
∃ e'', rtc erased_step (e :: tp, σ) (e'':: tp', σ') ∧ stuck e'' σ'. | Definition | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | eventually_stuck | |
eventually_stuck_now(e: expr) tp σ :
stuck e σ →
eventually_stuck e tp σ tp σ.
Proof.
intros.
exists e.
split; [ reflexivity | auto ].
Qed. | Lemma | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | eventually_stuck_now | |
eventually_stuck_stepse tp σ tp0 σ0 e' tp' σ' :
rtc erased_step (e :: tp, σ) (e' :: tp0, σ0) →
eventually_stuck e' tp0 σ0 tp' σ' →
eventually_stuck e tp σ tp' σ'.
Proof.
intros Hsteps (e'' & Hsteps' & Hstuck).
eexists. split; [ etrans; eauto | eauto ].
Qed. | Lemma | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | eventually_stuck_steps | |
eventually_stuck_fillK e tp σ tp' σ' :
eventually_stuck e tp σ tp' σ' →
eventually_stuck (fill K e) tp σ tp' σ'.
Proof.
intros (e' & Hsteps & Hstuck).
eexists (fill K e'). split.
- apply fill_erased_steps; auto.
- apply stuck_fill; auto.
Qed. | Lemma | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | eventually_stuck_fill | |
HintResolve interpret_sound : core. | Local | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | Hint | |
stuck_steps:=
eapply eventually_stuck_steps;
[ repeat step_ctx; (step_atomic || reflexivity)
|]. | Ltac | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | stuck_steps | |
stuck_fill:=
lazymatch goal with
| |- eventually_stuck ?e _ _ _ _ =>
change_to_fill e; apply eventually_stuck_fill; solve [ eauto ]
end. | Ltac | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | stuck_fill | |
terminal_expre :=
∀ K e', to_val e' = None →
e = fill K e' →
K = [] ∧ e' = e. | Definition | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | terminal_expr | |
stuck_not_vale σ :
to_val e = None →
(∀ (κs: list observation) (e': expr) (σ': state) (efs: list expr),
prim_step e σ κs e' σ' efs → False) →
stuck e σ.
Proof.
rewrite /stuck /irreducible.
intuition.
Qed. | Lemma | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | stuck_not_val | |
HintResolve val_base_stuck : core. | Local | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | Hint | |
terminal_expr_stucke σ :
to_val e = None →
terminal_expr e →
(∀ κ e' σ' efs, base_step e σ κ e' σ' efs → False) →
stuck e σ.
Proof.
intros Hnot_val Hterminal Hno_base_step.
apply stuck_not_val; first done; intros * Hstep.
invc Hstep; simpl in *.
lazymatch type of Hnot_val with
| to... | Lemma | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | terminal_expr_stuck | |
fill_not_val'K e v :
to_val e = None →
Val v = fill K e →
False.
Proof.
intros H Hfill.
apply (fill_not_val K) in H; simpl in *.
rewrite -Hfill /= in H.
congruence.
Qed. | Lemma | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | fill_not_val' | |
list_rev_case{A} (l: list A) :
l = [] ∨ ∃ x l', l = l' ++ [x].
Proof.
induction l using rev_ind; eauto.
Qed. | Lemma | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | list_rev_case | |
ctx_caseK Ki :=
let K' := fresh "K" in
destruct (list_rev_case K) as [->| (Ki & K' & ->)]; [by auto|];
rewrite ?fill_app /=. | Ltac | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | ctx_case | |
prove_terminal:=
lazymatch goal with
| |- terminal_expr _ =>
let K := fresh "K" in
let e := fresh "e" in
let Ki := fresh "Ki" in
intros K e; ctx_case K Ki;
destruct Ki;
let H := fresh in
intros ? H; invc H;
solve [ exfalso; eauto using fill_not_val' ]
| _ => f... | Ltac | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | prove_terminal | |
fill_app_invv1 v2 :
terminal_expr (App (Val v1) (Val v2)).
Proof. prove_terminal. Qed. | Lemma | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | fill_app_inv | |
stuck_now:=
apply eventually_stuck_now, terminal_expr_stuck;
[done
|prove_terminal
|let H := fresh "Hstep" in
intros * H;
try (inversion H; congruence) ]. | Ltac | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | stuck_now | |
interpret_completefuel : ∀ e s msg s',
∀ (Hwf: state_wf s),
interpret fuel e s = (inr (Stuck msg), s') →
eventually_stuck e s.(forked_threads) s.(lang_state) s'.(forked_threads) s'.(lang_state).
Proof.
induction fuel as [|fuel]; simpl; intros e s msg s' **; [congruence|].
destruct e; failure; ... | Lemma | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | interpret_complete | |
exec(fuel:nat) (e: expr) : val + Error :=
interp_monad.run (interpret fuel e). | Definition | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | exec | |
exec_specfuel e :
match exec fuel e with
| inl v => | Theorem | iris_unstable | [
"From stdpp Require Import gmap",
"From iris.heap_lang Require Export lang",
"From iris.heap_lang Require Import tactics pretty",
"From iris.prelude Require Import options"
] | iris_unstable/heap_lang/interpreter.v | exec_spec |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.