aboutsummaryrefslogtreecommitdiffstats
path: root/backend/Constpropproof.v
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2014-11-03 17:40:22 +0100
committerXavier Leroy <xavier.leroy@inria.fr>2014-11-24 17:38:06 +0100
commitad8c37d0ebb36cb2e54baeacf5a4c7ff145b1a99 (patch)
tree34c130d8052a83b05f5db755997f7d60a94481e6 /backend/Constpropproof.v
parent1e29e518e62ad88e9c2e2b180beb07434a07cdd7 (diff)
downloadcompcert-ad8c37d0ebb36cb2e54baeacf5a4c7ff145b1a99.tar.gz
compcert-ad8c37d0ebb36cb2e54baeacf5a4c7ff145b1a99.zip
Add Genv.public_symbol operation.
Restrict pointer event values to public global names. Update proofs accordingly. PowerPC and ARM need updating.
Diffstat (limited to 'backend/Constpropproof.v')
-rw-r--r--backend/Constpropproof.v13
1 files changed, 10 insertions, 3 deletions
diff --git a/backend/Constpropproof.v b/backend/Constpropproof.v
index b79c721e..98e6e577 100644
--- a/backend/Constpropproof.v
+++ b/backend/Constpropproof.v
@@ -54,6 +54,13 @@ Proof.
apply Genv.find_symbol_transf.
Qed.
+Lemma public_preserved:
+ forall (s: ident), Genv.public_symbol tge s = Genv.public_symbol ge s.
+Proof.
+ intros; unfold ge, tge, tprog, transf_program.
+ apply Genv.public_symbol_transf.
+Qed.
+
Lemma varinfo_preserved:
forall b, Genv.find_var_info tge b = Genv.find_var_info ge b.
Proof.
@@ -510,7 +517,7 @@ Opaque builtin_strength_reduction.
left; econstructor; econstructor; split.
eapply exec_Ibuiltin. eauto.
eapply external_call_symbols_preserved; eauto.
- exact symbols_preserved. exact varinfo_preserved.
+ exact symbols_preserved. exact public_preserved. exact varinfo_preserved.
eapply match_states_succ; eauto. simpl; auto.
apply set_reg_lessdef; auto.
@@ -582,7 +589,7 @@ Opaque builtin_strength_reduction.
simpl. left; econstructor; econstructor; split.
eapply exec_function_external; eauto.
eapply external_call_symbols_preserved; eauto.
- exact symbols_preserved. exact varinfo_preserved.
+ exact symbols_preserved. exact public_preserved. exact varinfo_preserved.
constructor; auto.
(* return *)
@@ -638,7 +645,7 @@ Proof.
intros [ [n2 [s2' [A B]]] | [n2 [A [B C]]]].
exists n2; exists s2'; split; auto. left; apply plus_one; auto.
exists n2; exists s2; split; auto. right; split; auto. subst t; apply star_refl.
-- eexact symbols_preserved.
+- eexact public_preserved.
Qed.
End PRESERVATION.