Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Model Checking and Verificationの一部紹介 #sigstj

405fe9ab689473f267e2cfbd95f78c75?s=47 kyonmm
August 26, 2017

Model Checking and Verificationの一部紹介 #sigstj

ICST2017まるわかりDay の発表資料です。
https://sigstj.connpass.com/event/59052/

Statistical Model Checking Meets Property-Based Testing とTimed k-Tail: Automatic Inference of Timed Automata の紹介になります。

405fe9ab689473f267e2cfbd95f78c75?s=128

kyonmm

August 26, 2017
Tweet

Transcript

  1. Statistical Model Checking Meets Property-Based Testing 2017/08/26 #sigstj kyon_mm

  2. ର৅࿦จ • Statistical Model Checking Meets Property- Based Testing •

    Bernhard K. Aichernig and Richard Schumi • Institute of Software Technology, Graz University of Technology, Austria • {aichernig, rschumi}@ist.tugraz.at
  3. ֓ཁ • ౷ܭతϞσϧݕࠪΛ΋ͬͱศརʹ࢖͑ΔΑ͏ʹͨ͠ɻ • ۩ମతʹ͸FsCheckͱ͍͏F# ༻ͷϓϩύςΟϕʔε υςεςΟϯάϑϨʔϜϫʔΫΛ C# ͔Βར༻͢Δ ܗͰ࣮૷ɻ

    • جຊతʹ͸ஶऀ͕ͨͪҎલʹ֓೦͚ͩఏএͨ͠࿦จ ͷଓ͖ͱ͍͏ཱͪҐஔɻ
  4. ิ଍ • Statistical Model Checkingʢ౷ܭతϞσϧݕ ࠪʣͱ͸ಈతςετͷҰछɻ • ʮϓϩάϥϜ͕͋Δ֬཰౷ܭϞσϧͷੑ࣭Λ ͍࣋ͬͯΔʯͱ͍͏ͷΛ࣮ূ͢ΔͨΊʹɺϓ ϩάϥϜΛಈ࡞ͤͯ͞ɺ౷ܭతʹͦͷϞσϧ

    ͱҰக͢Δ͔Λݕࠪ͢Δํ๏࿦ɻ
  5. ิ଍ • Property-Based TestingʢϓϩύςΟϕʔευ ςετʣͱ͸ςετ࣮૷ํ๏ͷҰछʢཁग़యʣ • ʮ͋ΔϓϩάϥϜ͕͋Δೖྗͷൣғʹରͯ͠ ͋Δग़ྗΛ͢Δʯͱ͍͏ੑ࣭ʢϓϩάϥϜʣ Λఆٛ͠ɺͦͷੑ࣭Λ΋ͱʹςετέʔεΛ ࣗಈੜ੒ɺ࣮ߦɺݕࠪΛ͢Δɻ

  6. ಋೖ • SMC͸ૉ੖Β͍͕͠ɺઐ༻ͷϞσϦϯάݴޠʹͳ͍ͬͯͯ࢖͍ʹ ͍͘ɻ • ྫʣUPPAAL ͰϞσϦϯάͯ͠ɺUPPAAL-SMCͰνΣοΫ͢ Δɻ • PBTͱSMC͸͋ΔϞσϧΛ΋ͱʹಈతςετΛ͢Δͱ͍͏఺Ͱ਌

    ࿨ੑ͕ߴ͍ɻ • طଘͷPBTϑϨʔϜϫʔΫ͔ΒSMCΛ࢖͑ΔΑ͏ʹ͢Ε͹͍͍Μ ͡ΌͶʁͱ͍͏ൃ૝ɻ
  7. ؔ࿈ • UPPAAL-SMCͱ͔ͨ͘͞Μ͋Δɻͨͩೖྗ͕ઐ༻ݴޠɻ • Ұ൪ͷର߅അ͸PLASMA-lab libraryͰɺ͜Ε͸֤छϞσϦϯά πʔϧͱ࿈ܞͰ͖ͨΓɺࣗ෼Ͱݕࠪ෦෼Λ֦ுͰ͖ͨΓศརʹͳͬ ͍ͯΔɻ • ֦ு͢ΔͨΊʹPLASMA-lab

    libraryͷΞʔΩςΫνϟΛ஌Βͳ ͍ͱ͍͚ͳ͍ɻ • ݱ࣮తʹ৽͍͠ه๏ʹͳΕΔͨΊʹγϯλοΫεγϡΨʔΛ͍Ε ͨΓ͢Δ͜ͱ͕͋Δɻ
  8. ࣮૷ • PBTͷϓϩύςΟͱͯ͠SMCΞϧΰϦζϜΛఆٛ͢Δɻ • SMCΞϧΰϦζϜྫ:Simple Monte Carlo ͳͲ4ͭ΄Ͳɻ • αϯϓϧ਺΍ਫ਼౓ͷࢦఆ͕Ͱ͖ɺίϚϯυੜ੒தʹఀࢭ͢

    Δ͜ͱ΋Ͱ͖ΔΑ͏ʹ͍ͯ͠ΔͨΊɺඇৗʹॊೈʹSMCΛ ࢖͑Δ༷ʹͳ͍ͬͯΔɻ • ࣮૷͸શͯͰ100ߦલޙͳͷͰɺଞͷPBTϑϨʔϜϫʔΫʹ Ҡ২͢Δ͜ͱ΋؆୯ɻ
  9. ධՁ • SMCπʔϧք۾͔Β3ͭͷྫ୊Λղ͍ͯΈͯɺ PLASMA-lab libraryͱൺֱͯ͠ΈΔɻ • ຊ࿦จͷఏҊझࢫ͸ʮ࢖͍΍͢͞ʯͰ͋Δɻ ͨͩ͠ɺPLASMA-lab library͕ύϑΥʔϚϯ ε݁ՌΛใࠂ͍ͯ͠ΔͨΊύϑΥʔϚϯεධ

    Ձ΋͍ͯ͠Δɻ
  10. ධՁ͓୊ • dining philosophersʢ৯ࣄ͢Δ఩ֶऀʣ • randomised consensus shared coin protocol

    • device discovery phase of Bluetooth
  11. ධՁ • ݕࠪ݁Ռ͸طଘπʔϧͱಉ༷ͷ݁ՌΛಘΒΕ Δ͜ͱ͕ग़དྷͨɻ • ৯ࣄ͢Δ఩ֶऀͷ৔߹Ͱ͸ɺ਺͕গͳ͍ͱ͖ ʹ͸Φʔόʔϔου͕େ͖͍͕ɺ఩ֶऀͷ਺ ͕300Ҏ্ʹͳΔͱఏҊख๏ͷ΄͏͕୹͍࣌ ؒͰऴྃ͢Δɻʢσʔλྔ૿Ճʹରͯ͠ίε τ͕௿͍ʣ

  12. ࠓޙ • ύϑΥʔϚϯεςετʹԠ༻͍ͨ͠ɻ • ࢈ۀքʹߩݙ͍ͨ͠ɻ

  13. ॴײ • ࣗ෼(kyon_mm)͕͔ͳΓࣅͨ͜ͱʢίϯύΠϧ࣌ʹ೚ ҙͷΦʔμʔʹै࣮ͬͨ૷ʹͳ͍ͬͯΔ͔Λࣗಈςε τ͢Δ࢓૊ΈʣΛίϯύΠϥ֦ுͰ͍ͭͬͯͨ͘ͷ΋ ͋ΓɺΞϧΰϦζϜؚΊͯΞϓϩʔν͕ҧ͏͜ͱʹࢗ ܹΛड͚ͨɻ • QuickCheckͱ૊Έ߹ΘͤΔ͜ͱ͸ඇৗʹے͕ྑ͍ͱࢥ ͏ͷͰɺOSS׆ಈͱͯ͠ීٴͯ͘͠ΕΔͱ͏Ε͍͠ɻ

  14. Timed k-Tail: Automatic Inference of Timed Automata 2017/08/26 #sigstj kyon_mm

  15. ର৅࿦จ • Timed k-Tail: Automatic Inference of Timed Automata •

    Fabrizio Pastore, Daniela Micucci, Leonardo Mariani • Department of Informatics, Systems, and COmmunications University of Milano - Bicocca Milano, 20126 • Email: {pastore,micucci,mariani}@disco.unimib.it
  16. ಋೖ • ࣮ߦͰ͖ΔϓϩάϥϜ͔Β࢓༷Խํ๏ͱͯ͠ Timed k-TailʢTkTʣ࢓༷ϚΠχϯάٕज़Λఏ Ҋɻ • طଘͷϚΠχϯάख๏ʹଟ͍ػೳ໘͚ͩͰ͸ ͳ͘ɺλΠϛϯά໘ʹ΋౿ΈࠐΜͰɺϓϩά ϥϜͷ࣮ߦ࣌τϨʔε͔Β࢓༷ΛϞσϦϯά

    ͢Δɻ
  17. ಋೖ • ࢓༷ϚΠχϯάٕज़͸ɺ༗ݶঢ়ଶϞσϧɺ֦ு༗ݶঢ়ଶػցɺҰ࣌త ͳنଇɺ͓ΑͼෆมྔͳͲΛத৺ʹϞσϦϯά͢Δํ๏࿦͕͋Δɻػ ೳతଆ໘͸࢓༷ϚΠχϯάٕज़ʹΑͬͯ޿ൣғʹΘͨͬͯΧόʔ͞Εͯ ͖͕ͨɺػೳ໘ͱλΠϛϯά໘ͷؒͷ૬ޓ࡞༻ʹ͸΄ͱΜͲ஫ҙ͕෷ ΘΕ͍ͯͳ͍ɻ • ͜ͷ྆໘Λαϙʔτ͍ͯ͠Δ࣌ؒΦʔτϚτϯʹΑΔํ๏࿦͸Ұ෦ͷι ϑτ΢ΣΞγεςϜͰͷར༻ʹݶఆ͞Εͯ͠·͍ͬͯΔɻ

    • ΑΓ޿ൣͳγεςϜʹద༻ग़དྷΔ΋ͷʹPerfume͕͋Δ͕ɺ͜Ε͸γε ςϜͷಈ࡞ʹӨڹΛ༩͑͗͢Δ৔߹͕͋Δɻʢෆ৹ͳϦιʔεΛݕग़͢ Δ໨త
  18. ิ଍ • Timed Automataʢ࣌ؒΦʔτϚτϯʣ͸༗ݶ ΦʔτϚτϯͷ֦ுͰɺঢ়ଶભҠϞσϧʹ࣌ ؒͷ੍໿Λॻ͖଍ͨ͠Α͏ͳ΋ͷɻ

  19. ࣮૷ • ͦ͜Ͱɺωετͨ͠ૢ࡞ʢϝιουݺͼग़͠ ͷγʔέϯεͳͲʣʹ΋ରԠͨ͠࢓༷ϚΠχ ϯάٕज़ͱͯ͠ Timed K-TailΛఏҊ͢Δɻ • جຊతʹ͸ಛఆΦϖϨʔγϣϯͷ։࢝ɺऴྃɺ λΠϜελϯϓͷϩά͔Β࣌ؒ෇͖ͷϞσϧ

    Λࡶʹ࡞ͬͨ͋ͱʹϚʔδ͠ɺΨʔυ৚݅Λ ੜ੒͢Δɻ
  20. ධՁ • RQ1ɿTkT͸ιϑτ΢ΣΞͷಈ࡞Λแׅతʹ೺Ѳ͢ΔϞσϧΛਪ࿦Ͱ͖Δ ͔ʁ • RQ2ɿTkT͸ҟৗͳιϑτ΢ΣΞಈ࡞Λڋ൱͢Δਖ਼֬ͳϞσϧΛਪ࿦Ͱ͖ Δ͔ʁաෛՙঢ়ଶͰه࿥͞ΕͨτϨʔεɺҟৗτϨʔεΛڋ൱͢ΔͳͲɻ • RQ3ɿTkT͸๏త͓Αͼҧ๏ߦҝʹରॲ͢ΔೳྗͱͲͷΑ͏ʹόϥϯεΛ औ͍ͬͯΔ͔ʁ

    • RQ4ɿઈର࣌ؒ͸TkTͷ༗ޮੑʹͲͷΑ͏ʹӨڹ͢Δ͔ʁ • RQ5ɿTkT͸τϨʔεͷαΠζʹ߹ΘͤͯͲͷΑ͏ʹεέʔϧ͢Δ͔ʁ
  21. ධՁ • RQ1ɿTkT͸ιϑτ΢ΣΞͷಈ࡞Λแׅతʹ೺Ѳ͢ΔϞσϧΛਪ࿦Ͱ͖Δ ͔ʁ • ͍͍ͩͨྑ޷ͰɺPerfumeΑΓ΋গͳ͍σʔλ਺ͰΧόʔग़དྷ͍ͯΔΑ ͏ʹΈ͑Δ • RQ2ɿTkT͸ҟৗͳιϑτ΢ΣΞಈ࡞Λڋ൱͢Δਖ਼֬ͳϞσϧΛਪ࿦Ͱ͖Δ ͔ʁաෛՙঢ়ଶͰه࿥͞ΕͨτϨʔεΛڋ൱͢ΔͳͲɻ

    • PerfumeͱҧͬͯύϑΥʔϚϯεো֐ʹ͍ͭͯ΋ݕ஌Ͱ͖Δɻաෛՙ؀ڥ ʹ͓͚Δݕ஌ʹ͍ͭͯ͸Perfumeͱಉ౳ఔ౓ʹݕ஌Ͱ͖͍ͯΔɻແޮͳ τϨʔεʹ͍ͭͯ͸60%Λݕ஌Ͱ͖ͨɻ
  22. ධՁ • RQ3ɿTkT͸๏త͓Αͼҧ๏ߦҝʹରॲ͢ΔೳྗͱͲͷΑ͏ʹόϥϯεΛऔͬ ͍ͯΔ͔ʁ • ͍͍ͩͨྑ޷ͰɺPerfumeΑΓ΋গͳ͍σʔλ਺ͰΧόʔग़དྷ͍ͯΔΑ͏ʹ Έ͑Δ(RQ1ͱ΋ؔ࿈) • RQ4ɿઈର࣌ؒ͸TkTͷ༗ޮੑʹͲͷΑ͏ʹӨڹ͢Δ͔ʁ •

    ײ౓͕Լ͕Γɺಛҟੑ͕͕͋Δɻ • RQ5ɿTkT͸τϨʔεͷαΠζʹ߹ΘͤͯͲͷΑ͏ʹεέʔϧ͢Δ͔ʁ • ఏҊख๏͸ର਺ؔ਺తʹભҠ͠ྑ޷ɻPerfume͸ઢܗ૿ՃΛ͍ͯ͠Δɻ
  23. ·ͱΊͱࠓޙ • Ұ࿈ͷ࣮ߦτϨʔε͔Β࣌ؒΦʔτϚτϯΛੜ੒Ͱ͖Δ࢓༷ϚΠ χϯάٕज़Ͱ͋ΔTkTΛ঺հ͠·ͨ͠ɻ • ࣌ؒΦʔτϚτϯ͸ɺػೳతଆ໘ͱλΠϛϯάతଆ໘ͷ྆ํΛద ੾ʹද͢͜ͱ͕Ͱ͖ɺ͜ΕΒͷ2ͭͷଆ໘Λݸผʹ·ͨ͸ซͤͯߟ ྀ͢Δ෼ੳΛαϙʔτ͍ͯ͠·͢ɻ • ࠓޙ͸TkTΛΑΓେ͖ͳγεςϜʹద༻͢Δɻྫ͑͹ɺඇৗʹখ͞

    ͯ͘΋ਖ਼౰Ͱͳ͍ΦʔόʔϔουΛੜΈग़͢ো֐ͷΑ͏ͳɺݱࡏ ͸΄ͱΜͲัଊͰ͖ͳ͍ো֐Λݕग़͢ΔϝΧχζϜΛಋೖ͢Δͳ Ͳɻ
  24. ॴײ • http://www.lta.disco.unimib.it/tools/tkt/ ͰjarͱνϡʔτϦΞ ϧ͕ެ։͞Ε͍ͯΔͷͰ࢖ͬͯΈ͍ͨɻʢOSSʹͯ͠΄͍͠ʣ • ϓϩμΫτ͕Ṷ͔Δ·Ͱͷٸ͍Ͱͭ͘ΔԚ͍ίʔυͰ΋ϩάΛ ࢓ࠐΊ͹ɺ͜ΕʹΑͬͯ࢓༷Խ͕Ͱ͖ΔͷͰɺͦͷޙͷϦϓϨʔ ε΍ϦετϥΫνϟϦϯάΛڧྗʹαϙʔτͰ͖ΔՄೳੑ͕͋ Γͦ͏ɻ

    • ϩάϑΥʔϚολͱซͤͯ͜ͷϓϩμΫτΛ։ൃͰ͖Ε͹Ṷ͚ ͷωλʹͳΔͱࢥ͏ΜͰ͕͢ɺஶऀͨͪ͸Ͳ͏ࢥ͍ͬͯΔͷ͔ɻ