SlideShare uma empresa Scribd logo
1 de 50
2011/05/14 Boost.




Frama-C

  mzp /




          1
mzp /

        SE



> ocaml-nagoya
> ProofCafe
>       Scala

                 2
2/26   Ruby   02




       4
Reject




    5
Reject



   →




       5
@bleis             bf                           SQL

@sunflat     Amazon EC2

@yoya     PHP: ZendEngine

@terurou    CommonJS

@nari3     GC

@mallowlabs     AsakusaSattelite

@yoshihiro503                 Coq

@mzp

@wof_moriguchi F#

@keigoi     ocamljs     ocaml android   (       )

@osiire    GADT

@kaizen_nagoya                          XYZ

@dico_leque       Meta-objective Lisp

                                            6
@bleis             bf                           SQL

@sunflat     Amazon EC2

@yoya     PHP: ZendEngine

@terurou    CommonJS

@nari3     GC

@mallowlabs     AsakusaSattelite

@yoshihiro503                 Coq

@mzp                                                  !
@wof_moriguchi F#

@keigoi     ocamljs     ocaml android   (       )

@osiire    GADT

@kaizen_nagoya                          XYZ

@dico_leque       Meta-objective Lisp

                                            7
RubyKaigi2011




      8
!
:min()
min()

        2




        ←

            11
template


     ≦                                 OK

     >           (structual subtype)

template <class T>
T min(T x, T y) {
  return (x <= y) ? x : y;
}
                       12
auto concept Le<class T> {
  bool operator<=(T, T);
}

template <class T> requires Le<T>
T min(T x, T y) {
  return x <= y ? x : y;
}

                    13
// int
BOOST_CHECK_EQUAL( min(1, 2), 1 );
BOOST_CHECK_EQUAL( min(2, 1), 1 );
BOOST_CHECK_EQUAL( min(3, 3), 3 );

// dobule
BOOST_CHECK_EQUAL( min(1., 2.), 1. );
BOOST_CHECK_EQUAL( min(2., 1.), 1. );
                      14
...

3




    ←

        15
1

     min

               ≦                OK

template <class T> requires Le<T>
T min3(T x, T y, T z) {
  return min(x, min(y, z));
}
                   16
// int
BOOST_CHECK_EQUAL( min3(1, 2,3), 1 );
BOOST_CHECK_EQUAL( min3(2, 1,3), 1 );
BOOST_CHECK_EQUAL( min3(3, 2,1), 1 );

// dobule
BOOST_CHECK_EQUAL( min3(1., 2.,4.), 1. );
BOOST_CHECK_EQUAL( min3(2., 1.,4.), 1. );
                      17
..
“       ”: int   int

≦        :x≦y          z≦w           (x,z) ≦
(y,w)

                       &'(           !"#"$




    ←                        !"#%$           !%#"$



                       )*(           !%#%$

                       19
“       ”: int   int

≦        :x≦y          z≦w           (x,z) ≦
(y,w)

                       &'(           !"#"$




    ←                        !"#%$           !%#"$



                       )*(           !%#%$

                       19
≦                      OK ←




>       :x≦x

>       :x≦y   y≦z   x≦z

↑

               20
>   ≦ bool
     min,min3

↑



                21
...
...
Frama-C[1]
C



> Value Analysis, Effects Analysis, etc




                        24
C → Why →

>   Alt-Ergo:         ←

>   Coq:          ←

>   ...and more

        ACSL

>   ACSL = ANSI/ISO C Specification Language



!"#$#%&                   '()                 *+,%-"./


                           25
                                               00&/1
: abs()

     abs      :         0

     ACSL


//@ ensures result >= 0;
int abs (int i) {
  return i < 0 ? -i : i;
}
                   26
$ frama-c -jessie abs.c




                     27
$ frama-c -jessie abs.c




                     27
$ frama-c -jessie abs.c




                     27
$ frama-c -jessie abs.c




                !

                     27
$ frama-c -jessie abs.c




                          INT_MIN

                !

                     27
requires

          INT_MIN


//@ requires i > -2147483648;
//@ ensures result >= 0;
int abs (int i) {
  return i < 0 ? -i : i;

                    28
29
Frama-C
    C++
C C++

>         Frama-C




           30
: LE
     ≦                        → LE

    >C          ACSL




/*@ axiomatic order {
  predicate LE(T x, T y);
} */
                       31
Frama-C

     min,min3 C++                     Frama-C


     T                      → void*

                      →

     >


typedef void* T;
bool leq(T x, T y) { return true; }

                       32
leq
    leq       :              LE

    > leq(x,y) true     LE(x,y)

    > leq(x,y) false        LE(y, x)

/*@ ensures
 (¥result == true ==> LE(x,y)) &&
 (¥result == false ==> LE(y,x)); */
bool leq(T x, T y){ ... }
                       33
min

      leq         min

                             x,y


/*@ ensures LE(¥result, x) &&
       LE(¥result, y); */
T min(T x,T y){ return leq(x,y) ? x : y; }
                        34
→




35
LE(y_0_0, y_0_0)

LE(y,y)




          36
/*@ axiomatic order {
 predicate LE(T x, T y);
 axiom refl : ¥forall T x; LE(x,x);




                           ←
                      37
min3
     min3        :          x,y,z


/*@ ensures
 LE(result, x) &&
 LE(result, y) &&
 LE(result, z); */
T min3(T x,T y,T z){
 return min(x, min(y,z));
                     38
39
>       Coq
    →



              LE(        , min(y,z))
              LE(min(y,z), y)

              LE(        , y)
                    40
/*@ axiomatic order {
 predicate LE(T x, T y);
 axiom refl : ¥forall T x; LE(x,x);
 axiom trans: forall T x,T y,T z;
  LE(x,y) ==> LE(y,z) ==> LE(x,z);




                         ←
                    41
Frama-C


      min,min3



                 42
:ProofSummit


9/25(   ) 10:00    17:00

                       @

http://bit.ly/proofsummit
Coq,Agda2



                  43

Mais conteúdo relacionado

Mais procurados

RSA暗号運用でやってはいけない n のこと #ssmjp
RSA暗号運用でやってはいけない n のこと #ssmjpRSA暗号運用でやってはいけない n のこと #ssmjp
RSA暗号運用でやってはいけない n のこと #ssmjpsonickun
 
汎用性と高速性を目指したペアリング暗号ライブラリ mcl
汎用性と高速性を目指したペアリング暗号ライブラリ mcl汎用性と高速性を目指したペアリング暗号ライブラリ mcl
汎用性と高速性を目指したペアリング暗号ライブラリ mclMITSUNARI Shigeo
 
高速な倍精度指数関数expの実装
高速な倍精度指数関数expの実装高速な倍精度指数関数expの実装
高速な倍精度指数関数expの実装MITSUNARI Shigeo
 
x86x64 SSE4.2 POPCNT
x86x64 SSE4.2 POPCNTx86x64 SSE4.2 POPCNT
x86x64 SSE4.2 POPCNTtakesako
 
例外設計における大罪
例外設計における大罪例外設計における大罪
例外設計における大罪Takuto Wada
 
Tensor コアを使った PyTorch の高速化
Tensor コアを使った PyTorch の高速化Tensor コアを使った PyTorch の高速化
Tensor コアを使った PyTorch の高速化Yusuke Fujimoto
 
ブラックボックス最適化とその応用
ブラックボックス最適化とその応用ブラックボックス最適化とその応用
ブラックボックス最適化とその応用gree_tech
 
記号創発ロボティクスの狙い
記号創発ロボティクスの狙い 記号創発ロボティクスの狙い
記号創発ロボティクスの狙い Tadahiro Taniguchi
 
初めてのグラフカット
初めてのグラフカット初めてのグラフカット
初めてのグラフカットTsubasa Hirakawa
 
AVX-512(フォーマット)詳解
AVX-512(フォーマット)詳解AVX-512(フォーマット)詳解
AVX-512(フォーマット)詳解MITSUNARI Shigeo
 
PCAの最終形態GPLVMの解説
PCAの最終形態GPLVMの解説PCAの最終形態GPLVMの解説
PCAの最終形態GPLVMの解説弘毅 露崎
 
C#メタプログラミング概略 in 2021
C#メタプログラミング概略 in 2021C#メタプログラミング概略 in 2021
C#メタプログラミング概略 in 2021Atsushi Nakamura
 
[DL輪読会]Deep Neural Networks as Gaussian Processes
[DL輪読会]Deep Neural Networks as Gaussian Processes[DL輪読会]Deep Neural Networks as Gaussian Processes
[DL輪読会]Deep Neural Networks as Gaussian ProcessesDeep Learning JP
 
async/await のしくみ
async/await のしくみasync/await のしくみ
async/await のしくみ信之 岩永
 
DockerとPodmanの比較
DockerとPodmanの比較DockerとPodmanの比較
DockerとPodmanの比較Akihiro Suda
 
圏論のモナドとHaskellのモナド
圏論のモナドとHaskellのモナド圏論のモナドとHaskellのモナド
圏論のモナドとHaskellのモナドYoshihiro Mizoguchi
 
高位合成ツールVivado hlsのopen cv対応
高位合成ツールVivado hlsのopen cv対応高位合成ツールVivado hlsのopen cv対応
高位合成ツールVivado hlsのopen cv対応marsee101
 
計算機を用いて数学の問題を解くということ
計算機を用いて数学の問題を解くということ計算機を用いて数学の問題を解くということ
計算機を用いて数学の問題を解くということYoshihiro Mizoguchi
 
マーク&スイープ勉強会
マーク&スイープ勉強会マーク&スイープ勉強会
マーク&スイープ勉強会7shi
 
GoらしいAPIを求める旅路 (Go Conference 2018 Spring)
GoらしいAPIを求める旅路 (Go Conference 2018 Spring)GoらしいAPIを求める旅路 (Go Conference 2018 Spring)
GoらしいAPIを求める旅路 (Go Conference 2018 Spring)lestrrat
 

Mais procurados (20)

RSA暗号運用でやってはいけない n のこと #ssmjp
RSA暗号運用でやってはいけない n のこと #ssmjpRSA暗号運用でやってはいけない n のこと #ssmjp
RSA暗号運用でやってはいけない n のこと #ssmjp
 
汎用性と高速性を目指したペアリング暗号ライブラリ mcl
汎用性と高速性を目指したペアリング暗号ライブラリ mcl汎用性と高速性を目指したペアリング暗号ライブラリ mcl
汎用性と高速性を目指したペアリング暗号ライブラリ mcl
 
高速な倍精度指数関数expの実装
高速な倍精度指数関数expの実装高速な倍精度指数関数expの実装
高速な倍精度指数関数expの実装
 
x86x64 SSE4.2 POPCNT
x86x64 SSE4.2 POPCNTx86x64 SSE4.2 POPCNT
x86x64 SSE4.2 POPCNT
 
例外設計における大罪
例外設計における大罪例外設計における大罪
例外設計における大罪
 
Tensor コアを使った PyTorch の高速化
Tensor コアを使った PyTorch の高速化Tensor コアを使った PyTorch の高速化
Tensor コアを使った PyTorch の高速化
 
ブラックボックス最適化とその応用
ブラックボックス最適化とその応用ブラックボックス最適化とその応用
ブラックボックス最適化とその応用
 
記号創発ロボティクスの狙い
記号創発ロボティクスの狙い 記号創発ロボティクスの狙い
記号創発ロボティクスの狙い
 
初めてのグラフカット
初めてのグラフカット初めてのグラフカット
初めてのグラフカット
 
AVX-512(フォーマット)詳解
AVX-512(フォーマット)詳解AVX-512(フォーマット)詳解
AVX-512(フォーマット)詳解
 
PCAの最終形態GPLVMの解説
PCAの最終形態GPLVMの解説PCAの最終形態GPLVMの解説
PCAの最終形態GPLVMの解説
 
C#メタプログラミング概略 in 2021
C#メタプログラミング概略 in 2021C#メタプログラミング概略 in 2021
C#メタプログラミング概略 in 2021
 
[DL輪読会]Deep Neural Networks as Gaussian Processes
[DL輪読会]Deep Neural Networks as Gaussian Processes[DL輪読会]Deep Neural Networks as Gaussian Processes
[DL輪読会]Deep Neural Networks as Gaussian Processes
 
async/await のしくみ
async/await のしくみasync/await のしくみ
async/await のしくみ
 
DockerとPodmanの比較
DockerとPodmanの比較DockerとPodmanの比較
DockerとPodmanの比較
 
圏論のモナドとHaskellのモナド
圏論のモナドとHaskellのモナド圏論のモナドとHaskellのモナド
圏論のモナドとHaskellのモナド
 
高位合成ツールVivado hlsのopen cv対応
高位合成ツールVivado hlsのopen cv対応高位合成ツールVivado hlsのopen cv対応
高位合成ツールVivado hlsのopen cv対応
 
計算機を用いて数学の問題を解くということ
計算機を用いて数学の問題を解くということ計算機を用いて数学の問題を解くということ
計算機を用いて数学の問題を解くということ
 
マーク&スイープ勉強会
マーク&スイープ勉強会マーク&スイープ勉強会
マーク&スイープ勉強会
 
GoらしいAPIを求める旅路 (Go Conference 2018 Spring)
GoらしいAPIを求める旅路 (Go Conference 2018 Spring)GoらしいAPIを求める旅路 (Go Conference 2018 Spring)
GoらしいAPIを求める旅路 (Go Conference 2018 Spring)
 

Semelhante a 「Frama-Cによるソースコード検証」 (mzp)

Gentle Introduction to Functional Programming
Gentle Introduction to Functional ProgrammingGentle Introduction to Functional Programming
Gentle Introduction to Functional ProgrammingSaurabh Singh
 
FLATMAP ZAT SHIT : les monades expliquées aux geeks (Devoxx France 2013)
FLATMAP ZAT SHIT : les monades expliquées aux geeks (Devoxx France 2013)FLATMAP ZAT SHIT : les monades expliquées aux geeks (Devoxx France 2013)
FLATMAP ZAT SHIT : les monades expliquées aux geeks (Devoxx France 2013)François Sarradin
 
Sparse Matrix and Polynomial
Sparse Matrix and PolynomialSparse Matrix and Polynomial
Sparse Matrix and PolynomialAroosa Rajput
 
Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...
Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...
Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...Mozaic Works
 
Compilation of COSMO for GPU using LLVM
Compilation of COSMO for GPU using LLVMCompilation of COSMO for GPU using LLVM
Compilation of COSMO for GPU using LLVMLinaro
 
Write Python for Speed
Write Python for SpeedWrite Python for Speed
Write Python for SpeedYung-Yu Chen
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manualUma mohan
 
Yoyak ScalaDays 2015
Yoyak ScalaDays 2015Yoyak ScalaDays 2015
Yoyak ScalaDays 2015ihji
 
C Code and the Art of Obfuscation
C Code and the Art of ObfuscationC Code and the Art of Obfuscation
C Code and the Art of Obfuscationguest9006ab
 
C++11 - A Change in Style - v2.0
C++11 - A Change in Style - v2.0C++11 - A Change in Style - v2.0
C++11 - A Change in Style - v2.0Yaser Zhian
 
Truth, deduction, computation lecture g
Truth, deduction, computation   lecture gTruth, deduction, computation   lecture g
Truth, deduction, computation lecture gVlad Patryshev
 
Halide tutorial 2019
Halide tutorial 2019Halide tutorial 2019
Halide tutorial 2019Champ Yen
 
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
[FT-11][suhorng] “Poor Man's” Undergraduate CompilersFunctional Thursday
 
Current Score – 0 Due Wednesday, November 19 2014 0400 .docx
Current Score  –  0 Due  Wednesday, November 19 2014 0400 .docxCurrent Score  –  0 Due  Wednesday, November 19 2014 0400 .docx
Current Score – 0 Due Wednesday, November 19 2014 0400 .docxfaithxdunce63732
 
Raices de ecuaciones
Raices de ecuacionesRaices de ecuaciones
Raices de ecuacionesNatalia
 
Raices de ecuaciones
Raices de ecuacionesRaices de ecuaciones
Raices de ecuacionesNatalia
 
C++ lectures all chapters in one slide.pptx
C++ lectures all chapters in one slide.pptxC++ lectures all chapters in one slide.pptx
C++ lectures all chapters in one slide.pptxssuser3cbb4c
 
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPython
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPythonByterun, a Python bytecode interpreter - Allison Kaptur at NYCPython
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPythonakaptur
 

Semelhante a 「Frama-Cによるソースコード検証」 (mzp) (20)

Gentle Introduction to Functional Programming
Gentle Introduction to Functional ProgrammingGentle Introduction to Functional Programming
Gentle Introduction to Functional Programming
 
FLATMAP ZAT SHIT : les monades expliquées aux geeks (Devoxx France 2013)
FLATMAP ZAT SHIT : les monades expliquées aux geeks (Devoxx France 2013)FLATMAP ZAT SHIT : les monades expliquées aux geeks (Devoxx France 2013)
FLATMAP ZAT SHIT : les monades expliquées aux geeks (Devoxx France 2013)
 
Sparse Matrix and Polynomial
Sparse Matrix and PolynomialSparse Matrix and Polynomial
Sparse Matrix and Polynomial
 
Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...
Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...
Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...
 
Compilation of COSMO for GPU using LLVM
Compilation of COSMO for GPU using LLVMCompilation of COSMO for GPU using LLVM
Compilation of COSMO for GPU using LLVM
 
Write Python for Speed
Write Python for SpeedWrite Python for Speed
Write Python for Speed
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
Yoyak ScalaDays 2015
Yoyak ScalaDays 2015Yoyak ScalaDays 2015
Yoyak ScalaDays 2015
 
C Code and the Art of Obfuscation
C Code and the Art of ObfuscationC Code and the Art of Obfuscation
C Code and the Art of Obfuscation
 
C++11 - A Change in Style - v2.0
C++11 - A Change in Style - v2.0C++11 - A Change in Style - v2.0
C++11 - A Change in Style - v2.0
 
Truth, deduction, computation lecture g
Truth, deduction, computation   lecture gTruth, deduction, computation   lecture g
Truth, deduction, computation lecture g
 
Halide tutorial 2019
Halide tutorial 2019Halide tutorial 2019
Halide tutorial 2019
 
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
 
Vcs16
Vcs16Vcs16
Vcs16
 
Stop Monkeys Fall
Stop Monkeys FallStop Monkeys Fall
Stop Monkeys Fall
 
Current Score – 0 Due Wednesday, November 19 2014 0400 .docx
Current Score  –  0 Due  Wednesday, November 19 2014 0400 .docxCurrent Score  –  0 Due  Wednesday, November 19 2014 0400 .docx
Current Score – 0 Due Wednesday, November 19 2014 0400 .docx
 
Raices de ecuaciones
Raices de ecuacionesRaices de ecuaciones
Raices de ecuaciones
 
Raices de ecuaciones
Raices de ecuacionesRaices de ecuaciones
Raices de ecuaciones
 
C++ lectures all chapters in one slide.pptx
C++ lectures all chapters in one slide.pptxC++ lectures all chapters in one slide.pptx
C++ lectures all chapters in one slide.pptx
 
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPython
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPythonByterun, a Python bytecode interpreter - Allison Kaptur at NYCPython
Byterun, a Python bytecode interpreter - Allison Kaptur at NYCPython
 

Mais de Hiroki Mizuno

TypeSafe OSの試み
TypeSafe OSの試みTypeSafe OSの試み
TypeSafe OSの試みHiroki Mizuno
 
OCamlでWebアプリケーションを作るn個の方法
OCamlでWebアプリケーションを作るn個の方法OCamlでWebアプリケーションを作るn個の方法
OCamlでWebアプリケーションを作るn個の方法Hiroki Mizuno
 
#NGK2012B Excelによる設計書について
#NGK2012B Excelによる設計書について#NGK2012B Excelによる設計書について
#NGK2012B Excelによる設計書についてHiroki Mizuno
 
Scala基礎勉強会: Featherweight Scalaの紹介および型付け規則の決定可能性について
Scala基礎勉強会: Featherweight Scalaの紹介および型付け規則の決定可能性についてScala基礎勉強会: Featherweight Scalaの紹介および型付け規則の決定可能性について
Scala基礎勉強会: Featherweight Scalaの紹介および型付け規則の決定可能性についてHiroki Mizuno
 
Coq for Moblie Phone @ ML名古屋
Coq for Moblie Phone @ ML名古屋Coq for Moblie Phone @ ML名古屋
Coq for Moblie Phone @ ML名古屋Hiroki Mizuno
 
Darcs紹介@20120423-scmbc
Darcs紹介@20120423-scmbcDarcs紹介@20120423-scmbc
Darcs紹介@20120423-scmbcHiroki Mizuno
 
Gallinaによる証明駆動開発の魅力
Gallinaによる証明駆動開発の魅力Gallinaによる証明駆動開発の魅力
Gallinaによる証明駆動開発の魅力Hiroki Mizuno
 
CoqによるMsgPackの証明
CoqによるMsgPackの証明CoqによるMsgPackの証明
CoqによるMsgPackの証明Hiroki Mizuno
 
20110424 action scriptを使わないflash勉強会
20110424 action scriptを使わないflash勉強会20110424 action scriptを使わないflash勉強会
20110424 action scriptを使わないflash勉強会Hiroki Mizuno
 
Coq to Rubyによる証明駆動開発@名古屋ruby会議02
Coq to Rubyによる証明駆動開発@名古屋ruby会議02Coq to Rubyによる証明駆動開発@名古屋ruby会議02
Coq to Rubyによる証明駆動開発@名古屋ruby会議02Hiroki Mizuno
 
証明駆動開発のたのしみ@名古屋reject会議
証明駆動開発のたのしみ@名古屋reject会議証明駆動開発のたのしみ@名古屋reject会議
証明駆動開発のたのしみ@名古屋reject会議Hiroki Mizuno
 
Coqによる証明駆動開発
Coqによる証明駆動開発Coqによる証明駆動開発
Coqによる証明駆動開発Hiroki Mizuno
 
NGK忘年会 2010 / CoqからRubyへ
NGK忘年会 2010 / CoqからRubyへNGK忘年会 2010 / CoqからRubyへ
NGK忘年会 2010 / CoqからRubyへHiroki Mizuno
 
From Coq to Ruby / CoqからRubyへ
From Coq to Ruby / CoqからRubyへFrom Coq to Ruby / CoqからRubyへ
From Coq to Ruby / CoqからRubyへHiroki Mizuno
 
OCamlAPISearchの紹介
OCamlAPISearchの紹介OCamlAPISearchの紹介
OCamlAPISearchの紹介Hiroki Mizuno
 

Mais de Hiroki Mizuno (20)

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

Último

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

「Frama-Cによるソースコード検証」 (mzp)

  • 2. mzp / SE > ocaml-nagoya > ProofCafe > Scala 2
  • 3.
  • 4. 2/26 Ruby 02 4
  • 5. Reject 5
  • 6. Reject → 5
  • 7. @bleis bf SQL @sunflat Amazon EC2 @yoya PHP: ZendEngine @terurou CommonJS @nari3 GC @mallowlabs AsakusaSattelite @yoshihiro503 Coq @mzp @wof_moriguchi F# @keigoi  ocamljs ocaml android ( ) @osiire GADT @kaizen_nagoya XYZ @dico_leque Meta-objective Lisp 6
  • 8. @bleis bf SQL @sunflat Amazon EC2 @yoya PHP: ZendEngine @terurou CommonJS @nari3 GC @mallowlabs AsakusaSattelite @yoshihiro503 Coq @mzp ! @wof_moriguchi F# @keigoi  ocamljs ocaml android ( ) @osiire GADT @kaizen_nagoya XYZ @dico_leque Meta-objective Lisp 7
  • 10. !
  • 11.
  • 12. :min() min() 2 ← 11
  • 13. template ≦ OK > (structual subtype) template <class T> T min(T x, T y) { return (x <= y) ? x : y; } 12
  • 14. auto concept Le<class T> { bool operator<=(T, T); } template <class T> requires Le<T> T min(T x, T y) { return x <= y ? x : y; } 13
  • 15. // int BOOST_CHECK_EQUAL( min(1, 2), 1 ); BOOST_CHECK_EQUAL( min(2, 1), 1 ); BOOST_CHECK_EQUAL( min(3, 3), 3 ); // dobule BOOST_CHECK_EQUAL( min(1., 2.), 1. ); BOOST_CHECK_EQUAL( min(2., 1.), 1. ); 14
  • 16. ... 3 ← 15
  • 17. 1 min ≦ OK template <class T> requires Le<T> T min3(T x, T y, T z) { return min(x, min(y, z)); } 16
  • 18. // int BOOST_CHECK_EQUAL( min3(1, 2,3), 1 ); BOOST_CHECK_EQUAL( min3(2, 1,3), 1 ); BOOST_CHECK_EQUAL( min3(3, 2,1), 1 ); // dobule BOOST_CHECK_EQUAL( min3(1., 2.,4.), 1. ); BOOST_CHECK_EQUAL( min3(2., 1.,4.), 1. ); 17
  • 19. ..
  • 20. ”: int int ≦ :x≦y z≦w (x,z) ≦ (y,w) &'( !"#"$ ← !"#%$ !%#"$ )*( !%#%$ 19
  • 21. ”: int int ≦ :x≦y z≦w (x,z) ≦ (y,w) &'( !"#"$ ← !"#%$ !%#"$ )*( !%#%$ 19
  • 22. OK ← > :x≦x > :x≦y y≦z x≦z ↑ 20
  • 23. > ≦ bool min,min3 ↑ 21
  • 24. ...
  • 25. ...
  • 26.
  • 27. Frama-C[1] C > Value Analysis, Effects Analysis, etc 24
  • 28. C → Why → > Alt-Ergo: ← > Coq: ← > ...and more ACSL > ACSL = ANSI/ISO C Specification Language !"#$#%& '() *+,%-"./ 25 00&/1
  • 29. : abs() abs : 0 ACSL //@ ensures result >= 0; int abs (int i) { return i < 0 ? -i : i; } 26
  • 30. $ frama-c -jessie abs.c 27
  • 31. $ frama-c -jessie abs.c 27
  • 32. $ frama-c -jessie abs.c 27
  • 33. $ frama-c -jessie abs.c ! 27
  • 34. $ frama-c -jessie abs.c INT_MIN ! 27
  • 35. requires INT_MIN //@ requires i > -2147483648; //@ ensures result >= 0; int abs (int i) { return i < 0 ? -i : i; 28
  • 36. 29
  • 37. Frama-C C++ C C++ > Frama-C 30
  • 38. : LE ≦ → LE >C ACSL /*@ axiomatic order { predicate LE(T x, T y); } */ 31
  • 39. Frama-C min,min3 C++ Frama-C T → void* → > typedef void* T; bool leq(T x, T y) { return true; } 32
  • 40. leq leq : LE > leq(x,y) true LE(x,y) > leq(x,y) false LE(y, x) /*@ ensures (¥result == true ==> LE(x,y)) && (¥result == false ==> LE(y,x)); */ bool leq(T x, T y){ ... } 33
  • 41. min leq min x,y /*@ ensures LE(¥result, x) && LE(¥result, y); */ T min(T x,T y){ return leq(x,y) ? x : y; } 34
  • 44. /*@ axiomatic order { predicate LE(T x, T y); axiom refl : ¥forall T x; LE(x,x); ← 37
  • 45. min3 min3 : x,y,z /*@ ensures LE(result, x) && LE(result, y) && LE(result, z); */ T min3(T x,T y,T z){ return min(x, min(y,z)); 38
  • 46. 39
  • 47. > Coq → LE( , min(y,z)) LE(min(y,z), y) LE( , y) 40
  • 48. /*@ axiomatic order { predicate LE(T x, T y); axiom refl : ¥forall T x; LE(x,x); axiom trans: forall T x,T y,T z; LE(x,y) ==> LE(y,z) ==> LE(x,z); ← 41
  • 49. Frama-C min,min3 42
  • 50. :ProofSummit 9/25( ) 10:00 17:00 @ http://bit.ly/proofsummit Coq,Agda2 43

Notas do Editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n