diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-01-09 09:08:15 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-01-09 09:08:15 +0100 |
commit | 35a17f7c9a42e654a646114aeecfbba60fd71b06 (patch) | |
tree | df5462a0a80063ac92eb85a8c23ab5bf9fe3f259 | |
parent | 36f336d8c57f053342ec794e5bc802ebb66fc82b (diff) | |
download | compcert-kvx-35a17f7c9a42e654a646114aeecfbba60fd71b06.tar.gz compcert-kvx-35a17f7c9a42e654a646114aeecfbba60fd71b06.zip |
moving forward with proofs
-rw-r--r-- | backend/ForwardMoves.v | 9 | ||||
-rw-r--r-- | backend/ForwardMovesproof.v | 16 |
2 files changed, 20 insertions, 5 deletions
diff --git a/backend/ForwardMoves.v b/backend/ForwardMoves.v index 660d0458..e820723c 100644 --- a/backend/ForwardMoves.v +++ b/backend/ForwardMoves.v @@ -251,13 +251,14 @@ Definition apply_instr instr x := match instr with | Inop _ | Icond _ _ _ _ - | Istore _ _ _ _ _ => Some x + | Ijumptable _ _ + | Istore _ _ _ _ _ + | Icall _ _ _ _ _ => Some x | Iop Omove (src :: nil) dst _ => Some (move src dst x) | Iop _ _ dst _ - | Iload _ _ _ _ dst _ - | Icall _ _ _ dst _ => Some (kill dst x) + | Iload _ _ _ _ dst _=> Some (kill dst x) | Ibuiltin _ _ res _ => Some (kill_builtin_res res x) - | Itailcall _ _ _ | Ijumptable _ _ | Ireturn _ => RB.bot + | Itailcall _ _ _ | Ireturn _ => RB.bot end. Definition apply_instr' code (pc : node) (ro : RB.t) : RB.t := diff --git a/backend/ForwardMovesproof.v b/backend/ForwardMovesproof.v index 7727bc38..c44d4084 100644 --- a/backend/ForwardMovesproof.v +++ b/backend/ForwardMovesproof.v @@ -388,7 +388,21 @@ Proof. rewrite subst_args_ok by assumption. constructor. constructor; auto. constructor. - admit. + simpl in *. + unfold fmap_sem in *. + destruct (forward_map _) as [map |] eqn:MAP in *; trivial. + apply get_rb_sem_ge with (rb2 := map # pc); trivial. + replace (map # pc) with (apply_instr' (fn_code f) pc (map # pc)). + { + eapply DS.fixpoint_solution with (code := fn_code f) (successors := successors_instr); try eassumption. + 2: apply apply_instr'_bot. + simpl. tauto. + } + unfold apply_instr'. + unfold get_rb_sem in *. + destruct (map # pc) in *; try contradiction. + rewrite H. + reflexivity. (* tailcall *) - econstructor; split. |