Commit 876e9848 by Ralf Jung

### update to the current set of axioms

parent 97c0889d
 ... @@ -40,6 +40,8 @@ Module Type CORE_LANG. ... @@ -40,6 +40,8 @@ Module Type CORE_LANG. K1 [[ e ]] = K2 [[ e ]] -> K1 = K2. K1 [[ e ]] = K2 [[ e ]] -> K1 = K2. Axiom fill_inj2 : forall K e1 e2, Axiom fill_inj2 : forall K e1 e2, K [[ e1 ]] = K [[ e2 ]] -> e1 = e2. K [[ e1 ]] = K [[ e2 ]] -> e1 = e2. Axiom fill_noinv: forall K1 K2, (* Interestingly, it seems impossible to derive this *) K1 ∘ K2 = ε -> K1 = ε /\ K2 = ε. Axiom fill_value : forall K e, Axiom fill_value : forall K e, is_value (K [[ e ]]) -> is_value (K [[ e ]]) -> K = ε. K = ε. ... @@ -56,10 +58,14 @@ Module Type CORE_LANG. ... @@ -56,10 +58,14 @@ Module Type CORE_LANG. (** The primitive atomic stepping relation **) (** The primitive atomic stepping relation **) Parameter prim_step : prim_cfg -> prim_cfg -> Prop. Parameter prim_step : prim_cfg -> prim_cfg -> Prop. Definition reducible e: Prop := exists sigma cfg', prim_step (e, sigma) cfg'. Definition stuck (e : expr) : Prop := Definition stuck (e : expr) : Prop := forall σ c K e', forall K e', e = K [[ e' ]] -> e = K [[ e' ]] -> ~prim_step (e', σ) c. ~reducible e'. Axiom fork_stuck : Axiom fork_stuck : forall K e, stuck (K [[ fork e ]]). forall K e, stuck (K [[ fork e ]]). ... @@ -71,9 +77,9 @@ Module Type CORE_LANG. ... @@ -71,9 +77,9 @@ Module Type CORE_LANG. sub-context of K' - in other words, e also contains the reducible sub-context of K' - in other words, e also contains the reducible expression *) expression *) Axiom step_by_value : Axiom step_by_value : forall K K' e e' sigma cfg, forall K K' e e', K [[ e ]] = K' [[ e' ]] -> K [[ e ]] = K' [[ e' ]] -> prim_step (e', sigma) cfg -> reducible e' -> ~ is_value e -> ~ is_value e -> exists K'', K' = K ∘ K''. exists K'', K' = K ∘ K''. (* Similar to above, buth with a fork instead of a reducible (* Similar to above, buth with a fork instead of a reducible ... @@ -87,13 +93,13 @@ Module Type CORE_LANG. ... @@ -87,13 +93,13 @@ Module Type CORE_LANG. (** Atomic expressions **) (** Atomic expressions **) Parameter atomic : expr -> Prop. Parameter atomic : expr -> Prop. Axiom atomic_not_stuck : Axiom atomic_reducible : forall e, atomic e -> ~stuck e. forall e, atomic e -> reducible e. Axiom atomic_step : forall eR K e e' σ σ', Axiom atomic_step: forall e σ e' σ', atomic eR -> atomic e -> eR = K [[ e ]] -> prim_step (e, σ) (e', σ') -> prim_step (e, σ) (e', σ') -> is_value e'. K = ε /\ is_value e'. End CORE_LANG. End CORE_LANG.
 ... @@ -589,7 +589,7 @@ Module Iris (RL : PCM_T) (C : CORE_LANG). ... @@ -589,7 +589,7 @@ Module Iris (RL : PCM_T) (C : CORE_LANG). - intros w n r; apply Hp; exact I. - intros w n r; apply Hp; exact I. Qed. Qed. Lemma vsFalse m1 m2 : Lemma vsFalse m1 m2 : (* TODO move to derived rules *) valid (vs m1 m2 ⊥ ⊥). valid (vs m1 m2 ⊥ ⊥). Proof. Proof. rewrite valid_iff, box_top. rewrite valid_iff, box_top. ... @@ -745,7 +745,7 @@ Qed. ... @@ -745,7 +745,7 @@ Qed. (* XXX missing statements: GhostUpd, VSTimeless *) (* XXX missing statements: VSTimeless *) End ViewShiftProps. End ViewShiftProps. ... @@ -1163,7 +1163,7 @@ Qed. ... @@ -1163,7 +1163,7 @@ Qed. Qed. Qed. (** Framing **) (** Framing **) (* TODO: mask framing *) Lemma htFrame m P R e φ : Lemma htFrame m P R e φ : ht m P e φ ⊑ ht m (P * R) e (lift_bin sc φ (umconst R)). ht m P e φ ⊑ ht m (P * R) e (lift_bin sc φ (umconst R)). Proof. Proof. ... @@ -1270,8 +1270,6 @@ Qed. ... @@ -1270,8 +1270,6 @@ Qed. eapply fork_not_value; eassumption. eapply fork_not_value; eassumption. Qed. Qed. (** Not stated: the Shift (timeless) rule *) End HoareTripleProperties. End HoareTripleProperties. End Iris. End Iris.
 ... @@ -89,7 +89,48 @@ Module Lang (C : CORE_LANG). ... @@ -89,7 +89,48 @@ Module Lang (C : CORE_LANG). apply comp_ctx_inj1 in HEq; congruence. apply comp_ctx_inj1 in HEq; congruence. Qed. Qed. (* atomic expressions *) (* Lemmas about expressions *) Lemma reducible_not_value e: reducible e -> ~is_value e. Proof. intros H_red H_val. eapply values_stuck; try eassumption. now erewrite fill_empty. Qed. Lemma step_same_ctx: forall K K' e e', fill K e = fill K' e' -> reducible e -> reducible e' -> K = K'. Proof. intros K K' e e' H_fill H_red H_red'. edestruct (step_by_value K K' e e') as [K'' H_K'']. - assumption. - assumption. - now apply reducible_not_value. - edestruct (step_by_value K' K e' e) as [K''' H_K''']. + now symmetry. + assumption. + now apply reducible_not_value. + subst K. rewrite comp_ctx_assoc in H_K''. assert (H_emp := comp_ctx_neut_emp_r _ _ H_K''). apply fill_noinv in H_emp. destruct H_emp as[H_K'''_emp H_K''_emp]. subst K'' K'''. now rewrite comp_ctx_emp_r. Qed. Lemma atomic_not_stuck e: atomic e -> ~stuck e. Proof. intros H_atomic H_stuck. eapply H_stuck. - now erewrite fill_empty. - now eapply atomic_reducible. Qed. Lemma fork_not_atomic K e : Lemma fork_not_atomic K e : ~atomic (K [[ fork e ]]). ~atomic (K [[ fork e ]]). Proof. Proof. ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!