From 25b9b003178002360d666919f2e49e7f5f4a36e2 Mon Sep 17 00:00:00 2001 From: xleroy Date: Sat, 4 Feb 2012 19:14:14 +0000 Subject: Merge of the "volatile" branch: - native treatment of volatile accesses in CompCert C's semantics - translation of volatile accesses to built-ins in SimplExpr - native treatment of struct assignment and passing struct parameter by value - only passing struct result by value remains emulated - in cparser, remove emulations that are no longer used - added C99's type _Bool and used it to express || and && more efficiently. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1814 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- driver/Complements.v | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'driver/Complements.v') diff --git a/driver/Complements.v b/driver/Complements.v index 1b7e9744..57351a2a 100644 --- a/driver/Complements.v +++ b/driver/Complements.v @@ -78,15 +78,21 @@ Theorem transf_cstrategy_program_preservation: program_behaves (Asm.semantics tp) beh -> program_behaves (Cstrategy.semantics p) beh). Proof. + assert (WBT: forall p, well_behaved_traces (Cstrategy.semantics p)). + intros. eapply ssr_well_behaved. apply Cstrategy.semantics_strongly_receptive. intros. intuition. eapply forward_simulation_behavior_improves; eauto. apply (fst (transf_cstrategy_program_correct _ _ H)). - eapply backward_simulation_behavior_improves; eauto. + exploit backward_simulation_behavior_improves. apply (snd (transf_cstrategy_program_correct _ _ H)). + eauto. + intros [beh1 [A B]]. exists beh1; split; auto. rewrite atomic_behaviors; auto. eapply forward_simulation_same_safe_behavior; eauto. apply (fst (transf_cstrategy_program_correct _ _ H)). - eapply backward_simulation_same_safe_behavior; eauto. + exploit backward_simulation_same_safe_behavior. apply (snd (transf_cstrategy_program_correct _ _ H)). + intros. rewrite <- atomic_behaviors in H2; eauto. eauto. + intros. rewrite atomic_behaviors; auto. Qed. (** We can also use the alternate big-step semantics for [Cstrategy] -- cgit