SlideShare a Scribd company logo
Coq GC

  id:mzp




        2010-08-08 GC
    1
•        :

    • http://twitter.com/mzp
    • http://d.hatena.ne.jp/mzp/
•        :     SE

•                              Coq

                        2
:
                    GC
•
•   :



•       :


                    2010(c) nari3
            3
4
2010(c) nari3
5
M&S

•
•
•


          6
Coq



7
Coq

•
•

    •

              8
Coq                          (1)

•

    • OCaml,Haskell,Scheme
•

                     9
Coq                      (2)
•
• Twitter        reply



• Coq       20




            10
•   GC

•   (Safety)[1]




             [1]Burdy Gemplus Avenue ,  L. Burdy “B vs. Coq to prove
             a Garbage Collector” 2001

                  11
•
      •

  •   “ ”


Record Mem   {A : Type} :=
 mkMem {
  nodes :    set A;
  roots :    set A;
  frees :    set A;
  next   :   A -> option A;
  marker :   A -> mark;
 }.
                        12
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
•
•
              Safety


Lemma MarkPhase_Safety:∀(m1 m2: Mem),
  MarkPhase m1 m2 -> (* m1        m2    *)
  Safety m1 -> (* m1 Safety    *)

  Safety m2 ∧ MarksAll m2. (* m2 Safety      *)


               Safety         (   )
                        14
•
•                       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
•
•

    Lemma mark_phase_correct: ∀ m1 m2,
      m2 = mark_phase m1 ->
      MarkPhase m1 m2.

          (   )


                     16
•   OCaml

•           OCaml

•   GC

     GC                  GC




                    17
...
•       Coq           - Coq

•   8/29 13:00                    @

•   http://atnd.org/events/6022




                           18
•

• Burdy Gemplus Avenue ,  L. Burdy “B vs.
    Coq to prove a Garbage Collector” 2001




                     19

More Related Content

PDF
Giaotrinhmaplenguyenchanhtu1
PDF
2008 june 5
PDF
June 2011 1-2
PDF
President 2012-13
PDF
Complex Integral
KEY
明日から使える(?)Rubyトリビア
DOC
Question 6
PDF
RM FUNCIONAL
Giaotrinhmaplenguyenchanhtu1
2008 june 5
June 2011 1-2
President 2012-13
Complex Integral
明日から使える(?)Rubyトリビア
Question 6
RM FUNCIONAL

What's hot (19)

KEY
CoqでGCの証明をしてみたよ(LT)
PDF
Purely Functional Data Structures ex3.3 leftist heap
PPTX
Voronoi Diagrams
PDF
Bitcoin:Next
PDF
C coroutine
PDF
Ch25 17
KEY
Sombat kimatsu3
PDF
Magento Meetup Wroclaw Date And Time In Magento With Multistore (Maciej Harbu...
KEY
Sombat kimatsu2
PDF
June 2010 1
PDF
windshield defrost
DOCX
Answer to selected_miscellaneous_exercises
DOC
8.1 angle meas in polygons
PDF
Sumatorias Numéricas - RM
PPTX
Report Qsn 8 CA asn 3
PDF
110617 lt
PDF
PDF
CoqでGCの証明をしてみたよ(LT)
Purely Functional Data Structures ex3.3 leftist heap
Voronoi Diagrams
Bitcoin:Next
C coroutine
Ch25 17
Sombat kimatsu3
Magento Meetup Wroclaw Date And Time In Magento With Multistore (Maciej Harbu...
Sombat kimatsu2
June 2010 1
windshield defrost
Answer to selected_miscellaneous_exercises
8.1 angle meas in polygons
Sumatorias Numéricas - RM
Report Qsn 8 CA asn 3
110617 lt
Ad

Viewers also liked (8)

PDF
Typeclass
PDF
Cbug function Presentation
PDF
Coq setoid 20110129
PDF
Coq Tutorial at Proof Summit 2011
PDF
Proofsummit2011a
PDF
Coq for ML users
PDF
Type based termination for recursive definitions
KEY
Coq to Rubyによる証明駆動開発@名古屋ruby会議02
Typeclass
Cbug function Presentation
Coq setoid 20110129
Coq Tutorial at Proof Summit 2011
Proofsummit2011a
Coq for ML users
Type based termination for recursive definitions
Coq to Rubyによる証明駆動開発@名古屋ruby会議02
Ad

Similar to Proove Mark&Sweep GC with Coq (20)

KEY
CoqUn2010
KEY
証明駆動開発のたのしみ@名古屋reject会議
PDF
Coq Tutorial
PDF
Coq for beginners
KEY
Gallinaによる証明駆動開発の魅力
PDF
Continuation Passing Style and Macros in Clojure - Jan 2012
KEY
Five Languages in a Moment
KEY
Coqによる証明駆動開発
PDF
Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...
PDF
Clojure A Dynamic Programming Language for the JVM
KEY
SacalaZa #1
PDF
7li7w devcon5
KEY
「Frama-Cによるソースコード検証」 (mzp)
PDF
Clojure Interoperability
PDF
Functional Concepts for OOP Developers
PDF
Pune Clojure Course Outline
PDF
Programming Lisp Clojure - 2장 : 클로저 둘러보기
PDF
01. haskell introduction
PDF
2010 05-20-clojure concurrency--jugd
PDF
Haskell in the Real World
CoqUn2010
証明駆動開発のたのしみ@名古屋reject会議
Coq Tutorial
Coq for beginners
Gallinaによる証明駆動開発の魅力
Continuation Passing Style and Macros in Clojure - Jan 2012
Five Languages in a Moment
Coqによる証明駆動開発
Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...
Clojure A Dynamic Programming Language for the JVM
SacalaZa #1
7li7w devcon5
「Frama-Cによるソースコード検証」 (mzp)
Clojure Interoperability
Functional Concepts for OOP Developers
Pune Clojure Course Outline
Programming Lisp Clojure - 2장 : 클로저 둘러보기
01. haskell introduction
2010 05-20-clojure concurrency--jugd
Haskell in the Real World

More from Hiroki Mizuno (14)

PDF
TypeSafe OSの試み
PDF
OCamlでWebアプリケーションを作るn個の方法
PDF
#NGK2012B Excelによる設計書について
KEY
Scala基礎勉強会: Featherweight Scalaの紹介および型付け規則の決定可能性について
KEY
Java基礎
KEY
Sml#探検隊
KEY
どこでもCoq
KEY
Coq for Moblie Phone @ ML名古屋
PDF
Darcs紹介@20120423-scmbc
PDF
CoqによるMsgPackの証明
KEY
20110424 action scriptを使わないflash勉強会
KEY
NGK忘年会 2010 / CoqからRubyへ
PDF
From Coq to Ruby / CoqからRubyへ
KEY
OCamlAPISearchの紹介
TypeSafe OSの試み
OCamlでWebアプリケーションを作るn個の方法
#NGK2012B Excelによる設計書について
Scala基礎勉強会: Featherweight Scalaの紹介および型付け規則の決定可能性について
Java基礎
Sml#探検隊
どこでもCoq
Coq for Moblie Phone @ ML名古屋
Darcs紹介@20120423-scmbc
CoqによるMsgPackの証明
20110424 action scriptを使わないflash勉強会
NGK忘年会 2010 / CoqからRubyへ
From Coq to Ruby / CoqからRubyへ
OCamlAPISearchの紹介

Proove Mark&Sweep GC with Coq

  • 1. Coq GC id:mzp 2010-08-08 GC 1
  • 2. : • http://twitter.com/mzp • http://d.hatena.ne.jp/mzp/ • : SE • Coq 2
  • 3. : GC • • : • : 2010(c) nari3 3
  • 4. 4
  • 8. Coq • • • 8
  • 9. Coq (1) • • OCaml,Haskell,Scheme • 9
  • 10. Coq (2) • • Twitter reply • Coq 20 10
  • 11. GC • (Safety)[1] [1]Burdy Gemplus Avenue ,  L. Burdy “B vs. Coq to prove a Garbage Collector” 2001 11
  • 12. • • “ ” Record Mem {A : Type} := mkMem { nodes : set A; roots : set A; frees : set A; next : A -> option A; marker : A -> mark; }. 12
  • 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. • • 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. • • 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. • • Lemma mark_phase_correct: ∀ m1 m2, m2 = mark_phase m1 -> MarkPhase m1 m2. ( ) 16
  • 17. OCaml • OCaml • GC GC GC 17
  • 18. ... • Coq - Coq • 8/29 13:00 @ • http://atnd.org/events/6022 18
  • 19. • • Burdy Gemplus Avenue ,  L. Burdy “B vs. Coq to prove a Garbage Collector” 2001 19