Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Introduction to VeriFast @ Kyoto

118 views

Published on

Introduction to VeriFast @ Kyoto

Published in: Technology
  • Be the first to comment

Introduction to VeriFast @ Kyoto

  1. 1. Introduction to VeriFast @ KyotoIntroduction to VeriFast @ KyotoIntroduction to VeriFast @ KyotoIntroduction to VeriFast @ KyotoIntroduction to VeriFast @ Kyoto Kiwamu OkabeKiwamu OkabeKiwamu OkabeKiwamu OkabeKiwamu Okabe
  2. 2. Setup before this presentationSetup before this presentationSetup before this presentationSetup before this presentationSetup before this presentation ☆ Plesse copy following files from the USB stick.☆ Plesse copy following files from the USB stick.☆ Plesse copy following files from the USB stick.☆ Plesse copy following files from the USB stick.☆ Plesse copy following files from the USB stick. chibios-verifast.tgz illegal_access.c verifast-nightly-osx.tar.gz verifast-nightly.tar.gz verifast-nightly.zip chibios-verifast.tgz illegal_access.c verifast-nightly-osx.tar.gz verifast-nightly.tar.gz verifast-nightly.zip chibios-verifast.tgz illegal_access.c verifast-nightly-osx.tar.gz verifast-nightly.tar.gz verifast-nightly.zip chibios-verifast.tgz illegal_access.c verifast-nightly-osx.tar.gz verifast-nightly.tar.gz verifast-nightly.zip chibios-verifast.tgz illegal_access.c verifast-nightly-osx.tar.gz verifast-nightly.tar.gz verifast-nightly.zip
  3. 3. What's VeriFast?What's VeriFast?What's VeriFast?What's VeriFast?What's VeriFast? ☆ https://github.com/verifast/verifast☆ https://github.com/verifast/verifast☆ https://github.com/verifast/verifast☆ https://github.com/verifast/verifast☆ https://github.com/verifast/verifast ☆ A verifier for single-threaded and multi- threaded C and Java language programs annotated with preconditions and postconditions written in separation logic. ☆ A verifier for single-threaded and multi- threaded C and Java language programs annotated with preconditions and postconditions written in separation logic. ☆ A verifier for single-threaded and multi- threaded C and Java language programs annotated with preconditions and postconditions written in separation logic. ☆ A verifier for single-threaded and multi- threaded C and Java language programs annotated with preconditions and postconditions written in separation logic. ☆ A verifier for single-threaded and multi- threaded C and Java language programs annotated with preconditions and postconditions written in separation logic. ☆ VeriFast avoids illegal memory accesses such like buffer overflow. ☆ VeriFast avoids illegal memory accesses such like buffer overflow. ☆ VeriFast avoids illegal memory accesses such like buffer overflow. ☆ VeriFast avoids illegal memory accesses such like buffer overflow. ☆ VeriFast avoids illegal memory accesses such like buffer overflow. ☆ VeriFast is easy to use with the graphical IDE.☆ VeriFast is easy to use with the graphical IDE.☆ VeriFast is easy to use with the graphical IDE.☆ VeriFast is easy to use with the graphical IDE.☆ VeriFast is easy to use with the graphical IDE.
  4. 4. Why use VeriFast? #1Why use VeriFast? #1Why use VeriFast? #1Why use VeriFast? #1Why use VeriFast? #1
  5. 5. Why use VeriFast? #2Why use VeriFast? #2Why use VeriFast? #2Why use VeriFast? #2Why use VeriFast? #2
  6. 6. Let's try to boot VeriFast!Let's try to boot VeriFast!Let's try to boot VeriFast!Let's try to boot VeriFast!Let's try to boot VeriFast! #�Windows $�unzip�verifast-nightly.zip $�./verifast-*/bin/vfide.exe #�Linux $�tar�xf�verifast-nightly.tar.gz $�./verifast-*/bin/vfide #�macOS $�tar�xf�verifast-nightly-osx.tar.gz $�./verifast-*/bin/vfide #�Windows $�unzip�verifast-nightly.zip $�./verifast-*/bin/vfide.exe #�Linux $�tar�xf�verifast-nightly.tar.gz $�./verifast-*/bin/vfide #�macOS $�tar�xf�verifast-nightly-osx.tar.gz $�./verifast-*/bin/vfide #�Windows $�unzip�verifast-nightly.zip $�./verifast-*/bin/vfide.exe #�Linux $�tar�xf�verifast-nightly.tar.gz $�./verifast-*/bin/vfide #�macOS $�tar�xf�verifast-nightly-osx.tar.gz $�./verifast-*/bin/vfide #�Windows $�unzip�verifast-nightly.zip $�./verifast-*/bin/vfide.exe #�Linux $�tar�xf�verifast-nightly.tar.gz $�./verifast-*/bin/vfide #�macOS $�tar�xf�verifast-nightly-osx.tar.gz $�./verifast-*/bin/vfide #�Windows $�unzip�verifast-nightly.zip $�./verifast-*/bin/vfide.exe #�Linux $�tar�xf�verifast-nightly.tar.gz $�./verifast-*/bin/vfide #�macOS $�tar�xf�verifast-nightly-osx.tar.gz $�./verifast-*/bin/vfide
  7. 7. You will see VeriFast IDE windowYou will see VeriFast IDE windowYou will see VeriFast IDE windowYou will see VeriFast IDE windowYou will see VeriFast IDE window
  8. 8. Open "illegal_access.c" fileOpen "illegal_access.c" fileOpen "illegal_access.c" fileOpen "illegal_access.c" fileOpen "illegal_access.c" file
  9. 9. VeriFast finds an error, if verify itVeriFast finds an error, if verify itVeriFast finds an error, if verify itVeriFast finds an error, if verify itVeriFast finds an error, if verify it
  10. 10. Why does the error occur?Why does the error occur?Why does the error occur?Why does the error occur?Why does the error occur? ☆ The malloc(3) may return NULL pointer.☆ The malloc(3) may return NULL pointer.☆ The malloc(3) may return NULL pointer.☆ The malloc(3) may return NULL pointer.☆ The malloc(3) may return NULL pointer. ☆ But "myAccount->balance" dereferences the pointer without checking NULL. ☆ But "myAccount->balance" dereferences the pointer without checking NULL. ☆ But "myAccount->balance" dereferences the pointer without checking NULL. ☆ But "myAccount->balance" dereferences the pointer without checking NULL. ☆ But "myAccount->balance" dereferences the pointer without checking NULL.
  11. 11. Modify code, and verify itModify code, and verify itModify code, and verify itModify code, and verify itModify code, and verify it
  12. 12. Example for RTOS application #1Example for RTOS application #1Example for RTOS application #1Example for RTOS application #1Example for RTOS application #1 $�export�PATH=`pwd`/verifast-*/bin:$PATH $�tar�xf�chibios-verifast.tgz $�cd�chibios-verifast/verifast_demo/STM32/RT-STM32F746G-DISCOVERY-LWIP-FATFS- USB $�make�vfide $�export�PATH=`pwd`/verifast-*/bin:$PATH $�tar�xf�chibios-verifast.tgz $�cd�chibios-verifast/verifast_demo/STM32/RT-STM32F746G-DISCOVERY-LWIP-FATFS- USB $�make�vfide $�export�PATH=`pwd`/verifast-*/bin:$PATH $�tar�xf�chibios-verifast.tgz $�cd�chibios-verifast/verifast_demo/STM32/RT-STM32F746G-DISCOVERY-LWIP-FATFS- USB $�make�vfide $�export�PATH=`pwd`/verifast-*/bin:$PATH $�tar�xf�chibios-verifast.tgz $�cd�chibios-verifast/verifast_demo/STM32/RT-STM32F746G-DISCOVERY-LWIP-FATFS- USB $�make�vfide $�export�PATH=`pwd`/verifast-*/bin:$PATH $�tar�xf�chibios-verifast.tgz $�cd�chibios-verifast/verifast_demo/STM32/RT-STM32F746G-DISCOVERY-LWIP-FATFS- USB $�make�vfide
  13. 13. Uncheck arithmetic overflowUncheck arithmetic overflowUncheck arithmetic overflowUncheck arithmetic overflowUncheck arithmetic overflow
  14. 14. Verify RTOS applicationVerify RTOS applicationVerify RTOS applicationVerify RTOS applicationVerify RTOS application
  15. 15. VeriFast finds error with bad mannerVeriFast finds error with bad mannerVeriFast finds error with bad mannerVeriFast finds error with bad mannerVeriFast finds error with bad manner
  16. 16. The error is caused by system stateThe error is caused by system stateThe error is caused by system stateThe error is caused by system stateThe error is caused by system state
  17. 17. ConclusionConclusionConclusionConclusionConclusion ☆ VeriFast is easy to setup and use.☆ VeriFast is easy to setup and use.☆ VeriFast is easy to setup and use.☆ VeriFast is easy to setup and use.☆ VeriFast is easy to setup and use. ☆ VeriFast has own graphical IDE.☆ VeriFast has own graphical IDE.☆ VeriFast has own graphical IDE.☆ VeriFast has own graphical IDE.☆ VeriFast has own graphical IDE. ☆ VeriFast safely uses pointers.☆ VeriFast safely uses pointers.☆ VeriFast safely uses pointers.☆ VeriFast safely uses pointers.☆ VeriFast safely uses pointers. ☆ VeriFast finds violation of RTOS system state.☆ VeriFast finds violation of RTOS system state.☆ VeriFast finds violation of RTOS system state.☆ VeriFast finds violation of RTOS system state.☆ VeriFast finds violation of RTOS system state.
  18. 18. For more informationFor more informationFor more informationFor more informationFor more information In�English: "The�VeriFast�Program�Verifier:�A�Tutorial" https://people.cs.kuleuven.be/~bart.jacobs/verifast/tutorial.pdf ##�In�Japanese �プログラム検証器�VeriFast:�チュートリアル� https://github.com/jverifast-ug/translate/blob/master/Manual/Tutorial/ Tutorial.md "TPPMark2016�を解きながら学ぶ�VeriFast" https://speakerdeck.com/eldesh/tppmark2016-wojie-kinagaraxue-bu-verifast "VeriFast�Termination�Checking�Introduction(α)" https://speakerdeck.com/eldesh/verifast-termination-checking-introduction-a In�English: "The�VeriFast�Program�Verifier:�A�Tutorial" https://people.cs.kuleuven.be/~bart.jacobs/verifast/tutorial.pdf ##�In�Japanese �プログラム検証器�VeriFast:�チュートリアル� https://github.com/jverifast-ug/translate/blob/master/Manual/Tutorial/ Tutorial.md "TPPMark2016�を解きながら学ぶ�VeriFast" https://speakerdeck.com/eldesh/tppmark2016-wojie-kinagaraxue-bu-verifast "VeriFast�Termination�Checking�Introduction(α)" https://speakerdeck.com/eldesh/verifast-termination-checking-introduction-a In�English: "The�VeriFast�Program�Verifier:�A�Tutorial" https://people.cs.kuleuven.be/~bart.jacobs/verifast/tutorial.pdf ##�In�Japanese �プログラム検証器�VeriFast:�チュートリアル� https://github.com/jverifast-ug/translate/blob/master/Manual/Tutorial/ Tutorial.md "TPPMark2016�を解きながら学ぶ�VeriFast" https://speakerdeck.com/eldesh/tppmark2016-wojie-kinagaraxue-bu-verifast "VeriFast�Termination�Checking�Introduction(α)" https://speakerdeck.com/eldesh/verifast-termination-checking-introduction-a In�English: "The�VeriFast�Program�Verifier:�A�Tutorial" https://people.cs.kuleuven.be/~bart.jacobs/verifast/tutorial.pdf ##�In�Japanese �プログラム検証器�VeriFast:�チュートリアル� https://github.com/jverifast-ug/translate/blob/master/Manual/Tutorial/ Tutorial.md "TPPMark2016�を解きながら学ぶ�VeriFast" https://speakerdeck.com/eldesh/tppmark2016-wojie-kinagaraxue-bu-verifast "VeriFast�Termination�Checking�Introduction(α)" https://speakerdeck.com/eldesh/verifast-termination-checking-introduction-a In�English: "The�VeriFast�Program�Verifier:�A�Tutorial" https://people.cs.kuleuven.be/~bart.jacobs/verifast/tutorial.pdf ##�In�Japanese �プログラム検証器 VeriFast:�チュートリアル� https://github.com/jverifast-ug/translate/blob/master/Manual/Tutorial/ Tutorial.md "TPPMark2016�を解きながら学ぶ VeriFast" https://speakerdeck.com/eldesh/tppmark2016-wojie-kinagaraxue-bu-verifast "VeriFast�Termination�Checking�Introduction(α)" https://speakerdeck.com/eldesh/verifast-termination-checking-introduction-a
  19. 19. Meetup at Osaka tomorrowMeetup at Osaka tomorrowMeetup at Osaka tomorrowMeetup at Osaka tomorrowMeetup at Osaka tomorrow ☆ "#静的コード解析の会 第4回@⼤阪"☆ "#静的コード解析の会 第4回@⼤阪"☆ "#静的コード解析の会 第4回@⼤阪"☆ "#静的コード解析の会 第4回@⼤阪"☆ "#静的コード解析の会 第4回@⼤阪" ☆ https://metasepi.connpass.com/event/55350/☆ https://metasepi.connpass.com/event/55350/☆ https://metasepi.connpass.com/event/55350/☆ https://metasepi.connpass.com/event/55350/☆ https://metasepi.connpass.com/event/55350/ ☆ Some talks about "static code analysis"☆ Some talks about "static code analysis"☆ Some talks about "static code analysis"☆ Some talks about "static code analysis"☆ Some talks about "static code analysis" ☆ Hands-on VeriFast with STM32 microcontroller☆ Hands-on VeriFast with STM32 microcontroller☆ Hands-on VeriFast with STM32 microcontroller☆ Hands-on VeriFast with STM32 microcontroller☆ Hands-on VeriFast with STM32 microcontroller
  20. 20. 簡約!? λカ娘10 @ 参照透明な海を守る会簡約!? λカ娘10 @ 参照透明な海を守る会簡約!? λカ娘10 @ 参照透明な海を守る会簡約!? λカ娘10 @ 参照透明な海を守る会簡約!? λカ娘10 @ 参照透明な海を守る会 ☆ コミックマーケット92 - 1日⽬ ⾦曜日 東た11b☆ コミックマーケット92 - 1日⽬ ⾦曜日 東た11b☆ コミックマーケット92 - 1日⽬ ⾦曜日 東た11b☆ コミックマーケット92 - 1日⽬ ⾦曜日 東た11b☆ コミックマーケット92 - 1日⽬ ⾦曜日 東た11b ☆ http://www.paraiso-lang.org/ikmsm/books/ c92.html ☆ http://www.paraiso-lang.org/ikmsm/books/ c92.html ☆ http://www.paraiso-lang.org/ikmsm/books/ c92.html ☆ http://www.paraiso-lang.org/ikmsm/books/ c92.html ☆ http://www.paraiso-lang.org/ikmsm/books/ c92.html *�第1章�モナドとひも *�第2章�⽮澤にこ先輩と⼀緒にモナドモナド! *�第3章�Coqダンジョン:�底抜けの壺の夢 *�第4章�IST(Internal�Set�Theory)�⼊門�(後編) *�第5章�静的コード解析はいいぞ! *�第6章�VeriFastチュートリアル *�第1章�モナドとひも *�第2章�⽮澤にこ先輩と⼀緒にモナドモナド! *�第3章�Coqダンジョン:�底抜けの壺の夢 *�第4章�IST(Internal�Set�Theory)�⼊門�(後編) *�第5章�静的コード解析はいいぞ! *�第6章�VeriFastチュートリアル *�第1章�モナドとひも *�第2章�⽮澤にこ先輩と⼀緒にモナドモナド! *�第3章�Coqダンジョン:�底抜けの壺の夢 *�第4章�IST(Internal�Set�Theory)�⼊門�(後編) *�第5章�静的コード解析はいいぞ! *�第6章�VeriFastチュートリアル *�第1章�モナドとひも *�第2章�⽮澤にこ先輩と⼀緒にモナドモナド! *�第3章�Coqダンジョン:�底抜けの壺の夢 *�第4章�IST(Internal�Set�Theory)�⼊門�(後編) *�第5章�静的コード解析はいいぞ! *�第6章�VeriFastチュートリアル *�第1章 モナドとひも *�第2章 ⽮澤にこ先輩と⼀緒にモナドモナド! *�第3章 Coqダンジョン:�底抜けの壺の夢 *�第4章 IST(Internal�Set�Theory)�⼊門�(後編) *�第5章 静的コード解析はいいぞ! *�第6章 VeriFastチュートリアル
  21. 21. License of photosLicense of photosLicense of photosLicense of photosLicense of photos *�Creative�Commons�BBB�│�Flickr ��https://www.flickr.com/photos/steren/2732488224/ ��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0 *�kindle�paperwhite�3G�│�Kindle�paperwhite...�│�Tatsuo�Yamashita�│�Flickr ��https://www.flickr.com/photos/yto/8197280407/ ��Copyright:�Tatsuo�Yamashita�/�License:�CC�BY�2.0 *�Kyoto�│�Japan�│�Pedro�Szekely�│�Flickr ��https://www.flickr.com/photos/pedrosz/34993395402/ ��Copyright:�Pedro�Szekely�/�License:�CC�BY-SA�2.0 *�Creative�Commons�BBB�│�Flickr ��https://www.flickr.com/photos/steren/2732488224/ ��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0 *�kindle�paperwhite�3G�│�Kindle�paperwhite...�│�Tatsuo�Yamashita�│�Flickr ��https://www.flickr.com/photos/yto/8197280407/ ��Copyright:�Tatsuo�Yamashita�/�License:�CC�BY�2.0 *�Kyoto�│�Japan�│�Pedro�Szekely�│�Flickr ��https://www.flickr.com/photos/pedrosz/34993395402/ ��Copyright:�Pedro�Szekely�/�License:�CC�BY-SA�2.0 *�Creative�Commons�BBB�│�Flickr ��https://www.flickr.com/photos/steren/2732488224/ ��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0 *�kindle�paperwhite�3G�│�Kindle�paperwhite...�│�Tatsuo�Yamashita�│�Flickr ��https://www.flickr.com/photos/yto/8197280407/ ��Copyright:�Tatsuo�Yamashita�/�License:�CC�BY�2.0 *�Kyoto�│�Japan�│�Pedro�Szekely�│�Flickr ��https://www.flickr.com/photos/pedrosz/34993395402/ ��Copyright:�Pedro�Szekely�/�License:�CC�BY-SA�2.0 *�Creative�Commons�BBB�│�Flickr ��https://www.flickr.com/photos/steren/2732488224/ ��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0 *�kindle�paperwhite�3G�│�Kindle�paperwhite...�│�Tatsuo�Yamashita�│�Flickr ��https://www.flickr.com/photos/yto/8197280407/ ��Copyright:�Tatsuo�Yamashita�/�License:�CC�BY�2.0 *�Kyoto�│�Japan�│�Pedro�Szekely�│�Flickr ��https://www.flickr.com/photos/pedrosz/34993395402/ ��Copyright:�Pedro�Szekely�/�License:�CC�BY-SA�2.0 *�Creative�Commons�BBB�│�Flickr ��https://www.flickr.com/photos/steren/2732488224/ ��Copyright:�Steren�Giannini�/�License:�CC�BY�2.0 *�kindle�paperwhite�3G�│�Kindle�paperwhite...�│�Tatsuo�Yamashita�│�Flickr ��https://www.flickr.com/photos/yto/8197280407/ ��Copyright:�Tatsuo�Yamashita�/�License:�CC�BY�2.0 *�Kyoto�│�Japan�│�Pedro�Szekely�│�Flickr ��https://www.flickr.com/photos/pedrosz/34993395402/ ��Copyright:�Pedro�Szekely�/�License:�CC�BY-SA�2.0

×