diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-02-04 19:14:14 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-02-04 19:14:14 +0000 |
commit | 25b9b003178002360d666919f2e49e7f5f4a36e2 (patch) | |
tree | d5f7fb317f34f3a7ac9383c21b0eb143317c30f8 /driver/Complements.v | |
parent | 145b32ec504541e98f73b2c87ff2d8181b5e7968 (diff) | |
download | compcert-25b9b003178002360d666919f2e49e7f5f4a36e2.tar.gz compcert-25b9b003178002360d666919f2e49e7f5f4a36e2.zip |
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
Diffstat (limited to 'driver/Complements.v')
-rw-r--r-- | driver/Complements.v | 10 |
1 files changed, 8 insertions, 2 deletions
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] |