Proove Mark&Sweep GC with Coq

1,411 views
1,353 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,411
On SlideShare
0
From Embeds
0
Number of Embeds
208
Actions
Shares
0
Downloads
7
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide



















  • Proove Mark&Sweep GC with Coq

    1. 1. Coq GC id:mzp 2010-08-08 GC 1
    2. 2. • : • http://twitter.com/mzp • http://d.hatena.ne.jp/mzp/ • : SE • Coq 2
    3. 3. : GC • • : • : 2010(c) nari3 3
    4. 4. 4
    5. 5. 2010(c) nari3 5
    6. 6. M&S • • • 6
    7. 7. Coq 7
    8. 8. Coq • • • 8
    9. 9. Coq (1) • • OCaml,Haskell,Scheme • 9
    10. 10. Coq (2) • • Twitter reply • Coq 20 10
    11. 11. • GC • (Safety)[1] [1]Burdy Gemplus Avenue ,  L. Burdy “B vs. Coq to prove a Garbage Collector” 2001 11
    12. 12. • • • “ ” Record Mem {A : Type} := mkMem { nodes : set A; roots : set A; frees : set A; next : A -> option A; marker : A -> mark; }. 12
    13. 13. GC • • : (* m1 m2 *) Definition MarkPhase (m1 m2 : Mem) : Prop := roots m1 = roots m2 ∧ nodes m1 = nodes m2 ∧ frees m1 = frees m2 ∧ next m1 = next m2 ∧ Included (closuresM m2) (marksM Marked m2). (* ⊆ *) : ( ) 13
    14. 14. • • Safety Lemma MarkPhase_Safety:∀(m1 m2: Mem), MarkPhase m1 m2 -> (* m1 m2 *) Safety m1 -> (* m1 Safety *) Safety m2 ∧ MarksAll m2. (* m2 Safety *) Safety ( ) 14
    15. 15. • • OCaml Definition mark_phase (m : Mem) : Mem := mkMem A (nodes m) (roots m)(frees m) (fun x => if In_dec x (closuresM m) then Marked else Unmarked) (next m). ( ) 15
    16. 16. • • Lemma mark_phase_correct: ∀ m1 m2, m2 = mark_phase m1 -> MarkPhase m1 m2. ( ) 16
    17. 17. • OCaml • OCaml • GC GC GC 17
    18. 18. ... • Coq - Coq • 8/29 13:00 @ • http://atnd.org/events/6022 18
    19. 19. • • Burdy Gemplus Avenue ,  L. Burdy “B vs. Coq to prove a Garbage Collector” 2001 19

    ×