proposition: Lemma frr_dsr_reachable_iff_marked : forall from to roots1 roots2 g1 g2 g3, from <> to -> sound_gc_graph g1 -> graph_has_gen g1 to -> graph_unmarked g1 -> roots_graph_compatible roots1 g1 -> no_dangling_dst g1 -> no_edge2gen g1 from -> forward_roots_relation from to roots1 g1 roots2 g2 -> do_scan_relation from to (number_of_vertices (nth_gen g1 to)) g2 g3 -> forall v, reachable_through_set g1 (filter_sum_right roots1) v /\ vgeneration v = from <-> raw_mark (vlabel g3 v) = true /\ vvalid g3 v /\ vgeneration v = from.
proof: Proof. pose (H3:=True). intros from to roots1 roots2 g1 g2 g3 H H0 H1 H2 H4 H5 He H6 H7 v. assert (copied_vertex_prop g1 from to) by (now apply graph_unmarked_copied_vertex_prop). assert (copy_compatible g1) by (now apply graph_unmarked_copy_compatible). pose proof H6. apply frr_reachable_or_marked with (v := v) in H10; auto. pose proof H7. destruct H11 as [n [? ?]]. assert (backward_edge_prop g1 roots1 from to) by (apply no_edge2gen_bep; auto). assert (gen_unmarked g1 to) by (rewrite graph_gen_unmarked_iff in H2; apply H2). assert (sound_gc_graph g2) by (eapply frr_sound; eauto). assert (graph_has_gen g2 to) by (rewrite <- frr_graph_has_gen; eauto). eapply (svwl_reachable_or_marked _ _ roots2) in H11; eauto. instantiate (1 := v) in H11. - rewrite <- H10 in H11. assert (no_edge2gen g3 from) by ( eapply (frr_dsr_no_edge2gen _ _ _ _ g1 g2 g3); eauto). assert (roots_have_no_gen roots2 from) by (eapply frr_not_pointing; eauto; eapply frr_Zlength_roots; eauto). rewrite <- reachable_or_marked_iff_reachable; auto. rewrite <- reachable_or_marked_iff_marked; eauto. eapply dsr_sound; eauto. - eapply (frr_gen_unmarked from to _ g1); eauto. - eapply (frr_roots_graph_compatible _ _ _ g1); eauto. - eapply (frr_no_dangling_dst _ _ _ g1); eauto. - eapply (frr_copied_vertex_prop _ _ _ _ g1 g2); eauto. - eapply (frr_copy_compatible _ _ _ g1); eauto. - eapply (frr_backward_edge_prop _ _ _ _ g1 g2); eauto. Qed.
imports: Coq.ZArith.ZArith Coq.Program.Basics compcert.lib.Integers compcert.common.Values VST.veric.base VST.veric.Clight_lemmas VST.veric.val_lemmas VST.veric.shares VST.msl.seplog VST.msl.shares VST.zlist.sublist VST.floyd.coqlib3 VST.floyd.functional_base VST.floyd.data_at_rec_lemmas CertiGraph.lib.Coqlib CertiGraph.lib.EquivDec_ext CertiGraph.lib.List_ext CertiGraph.graph.graph_model CertiGraph.graph.graph_gen CertiGraph.graph.path_lemmas CertiGraph.graph.subgraph2 CertiGraph.graph.graph_relation CertiGraph.graph.graph_isomorphism CertiGraph.graph.reachable_ind CertiGraph.CertiGC.GCGraph