Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
introducing-formal-methods
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
rrreeeyyy
June 09, 2016
Technology
280
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
introducing-formal-methods
hbstyle-2016-06-09
rrreeeyyy
June 09, 2016
More Decks by rrreeeyyy
See All by rrreeeyyy
もう一度考える SRE チームの作り方・育て方 / Rethinking SRE #1: Building and Growing SRE Teams
rrreeeyyy
6
1.3k
Reliability in the Age of AI: Engineering for AI Velocity
rrreeeyyy
0
230
Rethinking Incident Response: Context-Aware AI in Practice - Incident Buddy Edition -
rrreeeyyy
0
290
Rethinking Incident Response: Context-Aware AI in Practice
rrreeeyyy
3
2.6k
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
350
An Efficient Incident Response Training with AI / SRE NEXT 2024 Sponsor Session
rrreeeyyy
1
6.3k
カンファレンスから見る SRE トレンド 2024 / SRE Trends from Conferences in 2024 #SRE_Findy
rrreeeyyy
4
2.7k
信頼性の育て方 / mackerel-meetup-15
rrreeeyyy
10
3.1k
SRE の歩き方・進め方 / sre-walk-through-procedure
rrreeeyyy
0
9.1k
Other Decks in Technology
See All in Technology
How to Design Configuration for Rails Applications
willnet
1
1.1k
LLM-as-a-Judgeは本当に信頼できるのか――評価器を評価する話
taka_aki
2
1k
Classmethod Company Deck
satoshi7
1
800
「エーアイ」をバズワードにしないために RPA 導入経験と Kiro 上での Claude モデル利用経験から
kazzpapa3
0
110
『SAR衛星データ解析入門』のご紹介とその応用
syuchimu
0
140
AIにシークレットを見せない、WSL2で安全な開発環境
yazm
0
330
Kiro Crewで「みのるん式」仕事術やってみた
minorun365
PRO
3
990
Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
1
1k
CSS2026:OWS研究会・招待講演「世界観を、実装する」
atsush1_sada
2
140
S3 Filesで挑む! 八戸せんべい汁の食べ頃問題
usanchuu
0
140
生成AI時代、PMは事業責任者に進化するともっと面白い〜PMだからこそ事業構造を動かせる時代に〜
kakehashi
PRO
0
200
[EMNLP26] RIGEL: Self-Distilled Score Adaptation for Image and Video Captioning Evaluation
keio_smilab
PRO
0
110
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Git: the NoSQL Database
bkeepers
PRO
433
67k
Speed Design
sergeychernyshev
33
2.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
Side Projects
sachag
456
43k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
370
Crafting Experiences
bethany
1
390
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
480
Transcript
ܗࣜख๏(formal-methods)ೖ hbstyle 2016/06/09 - Yoshikawa Ryota ( @rrreeeyyy ) 1
ܗࣜख๏(formal-methods) • ֶΛج൫ͱͨ͠ιϑτΣΞͷ༷هड़ɾ։ൃɾݕূͷٕज़ • ଞͷֶ(ػցֶͱ͔Ͷ)ಉ༷ʹֶతղੳΛใֶͰग़དྷΔʁ • ઃܭͷ৴པੑɾݎ࿚ੑͷ্Λతͱ͍ͯ͠Δ • ܗࣜݴޠɾཧཧֶɾܕγεςϜɾతσʔλܕͳͲΛ༻ •
͜ͷลͷ͜ͱʹڵຯ͕͋Δ • ֶ෦࣌ʹ TaPL 1 ͱ͍͏ຊΛྠಡͨ͠ܦݧΑΓ • ݎ࿚Ͱґଘੑͷඇৗʹߴ͍γεςϜ(ۜߦͱ͔ߤۭػͱ͔ϩέοτͱ͔)ͰΑ͘༻͍ΒΕΔ • NASA/AWS/FeliCa/TradeOne(ূ݊)/SHOLIS(ߤۭ) [^2] • ۙͳͱ͜ΖͰݴ͑ CCS Injection(OpenSSL) ͷ੬ऑੑͳΜ͔ 1 https://www.cis.upenn.edu/~bcpierce/tapl/ [^2]: http://www.ipa.go.jp/files/000026875.pdf hbstyle 2016/06/09 - Yoshikawa Ryota ( @rrreeeyyy ) 2
ܗࣜख๏ͷछྨ • Ͳͷਫ४ͰΔ͔ɺͱ͍͏ͷ͕େ͖͚ͯ͘ 3 ͭ • ܗ༷ࣜهड़ (Formal specification) •
ܗࣜత։ൃ͓Αͼݕূ (Formal development and formal verification) • ࣗಈݕূ (Theorem provers) • Ξϓϩʔν͕େ͖͚ͯ͘ 2 ͭ • ఆཧূ໌ (Explicit Model Checker) • Ϟσϧݕࠪ (Symbolic Model Checker) hbstyle 2016/06/09 - Yoshikawa Ryota ( @rrreeeyyy ) 3
ܗࣜख๏ͷਫ४ • ܗ༷ࣜهड़ (Formal specification) • ܗࣜख๏Λ༻͍༷ͯΛهड़͢Δ • ϓϩάϥϜͷ։ൃࣗମܗࣜख๏ͱরΒ͠߹Θͤͳ͕Βߦ͏ •
ܗࣜత։ൃ͓Αͼݕূ (Formal development and formal verification) • ܗࣜख๏Λ༻͍༷ͯΛهड़͢Δ(B-method3 ͳͲ) • هड़༷ͨ͠ΛߋʹৄࡉԽ͍͖ͯ͠ϓϩάϥϜΛ࡞͢ΔͳͲ • ࣗಈݕূ (Theorem provers) • ࣗಈఆཧূ໌ʹͯػցతͳূ໌Λߦ͏ • ఆཧΛ༩͑ΔͱϓϩάϥϜ͕ؤுͬͯূ໌ͯ͘͠ΕΔΑ͏ͳͷ 3 ύϦͷϝτϩ 14 ߸ઢͳͲͰΘΕ͍ͯΔΒ͍͠ hbstyle 2016/06/09 - Yoshikawa Ryota ( @rrreeeyyy ) 4
ܗࣜख๏ͷΞϓϩʔν • ఆཧূ໌ • γεςϜΛཧࣜͷू߹ͱͯ͠هड़͢Δ • ཧࣜΛެཧͱਪنଇʹͱ͍ͮͯূ໌͍ͯ͘͠ • େମͷ߹ͰࣗಈͰূ໌Ͱ͖ͳ͍ͷͰਓ͕ؒࢧԉ͠ͳ͕Βূ໌͢Δ •
B-method ͳͲ͕༗໊ • Ϟσϧݕࠪ • ରͱ͢ΔγεςϜΛঢ়ଶભҠਤͰϞσϧԽ • ࣌૬ཧࣜ4ͱݺΕΔࣜͰੑ࣭Λهड़ • ঢ়ଶભҠͷঢ়ଶΛཏ୳ࡧͯ࣌͠૬ཧࣜΛຬ͔ͨ͢ݕࠪ͢Δ • SPIN ͳͲ͕༗໊ 4 ࣌ؒͱͷؔͰมԽ͢Δঢ়ଶΛهड़͢Δཧࣜͷ͜ͱ hbstyle 2016/06/09 - Yoshikawa Ryota ( @rrreeeyyy ) 5
ܰྔͳܗࣜख๏ • ܗࣜख๏͍͠ • ϞσϧݕࠪΈ߹Θͤരൃ͕ى͖Δ • ఆཧূ໌େମͷ߹ͰࣗಈͰূ໌Ͱ͖ͳ͍ • ιϑτΣΞͷҰ෦ͷঢ়ଶΛཏతʹݕࠪ͢Δ •
΄ͱΜͲͷܽؕɺখ͍͞୳ࡧൣғͰ͋ͬͯྫͱͯ͠ൃݟ͞ΕΔ (Small Scope Hypothesis) • ࠷ܽؕͷى͖ͦ͏ͳॴΛूதతʹݕࠪ͢Δͷ͕ྑ͍ͩΖ͏ͱ͍͏ൃ (Daniel Jackson) • Alloy Analyzer ͳͲ͕༗໊ • ΠϯϑϥߏͰܗࣜख๏ΛऔΓೖΕΑ͏ͱ͢Δਓ͍Δ 5 5 http://ccvanishing.hateblo.jp/entry/2016/06/06/051120 hbstyle 2016/06/09 - Yoshikawa Ryota ( @rrreeeyyy ) 6
AWS ͷྫ • AWS Ͱ 2011 ͔Βܗࣜख๏Λ࠾༻͍ͯ͠Δ 6 • ࢄγεςϜͷΞϧΰϦζϜઃܭͳͲ
• DynamoDB/S3/EBS ͳͲ • AWS Ͱ TLA+ ͱ͍͏ͷΛͬͯܗࣜख๏Λѻ͍ͬͯΔ • ࠷ॳʹ༗༻ੑ͕࣮ূ͞Εͨͷ DynamoDB • େମೋि͙ؒΒ͍Ͱ TLA+ ͰΞϧΰϦζϜ͕ॻ͚ͨΒ͍͠ • ݕূ༷ͯ͠ʑͳোύλʔϯͷચ͍ग़͠ʹޭ • DynamoDB ͷޭΛड͚ͯ S3/EBS ͳͲͰܗࣜख๏͕औΓೖΕΒΕΔ 6 How Amazon web services uses formal methods: http://dl.acm.org/citation.cfm?id=2749359.2699417 hbstyle 2016/06/09 - Yoshikawa Ryota ( @rrreeeyyy ) 7
Raft Λ TLA+ Ͱهड़ͨ͠ྫ • https://github.com/ongardie/raft.tla/blob/master/raft.tla CONSTANTS RequestVoteRequest, RequestVoteResponse, AppendEntriesRequest,
AppendEntriesResponse Quorum == {i \in SUBSET(Server) : Cardinality(i) * 2 > Cardinality(Server)} InitHistoryVars == /\ elections = {} /\ allLogs = {} /\ voterLog = [i \in Server |-> [j \in {} |-> <<>>]] InitServerVars == /\ currentTerm = [i \in Server |-> 1] /\ state = [i \in Server |-> Follower] /\ votedFor = [i \in Server |-> Nil] InitCandidateVars == /\ votesResponded = [i \in Server |-> {}] /\ votesGranted = [i \in Server |-> {}] hbstyle 2016/06/09 - Yoshikawa Ryota ( @rrreeeyyy ) 8
ܕγεςϜฒྻॲཧͱ͔ͷྫ • ܕγεςϜ: ू߹ͱͯ͠ߟ͑Δ • ܕ(Int ͱ͔)ू߹ɾͦͷܕʹॴଐ͢Δมू߹ཁૉ • ܭࢉϞσϧ: ϥϜμܭࢉͱ͍͏ܭࢉܕΛ͏
• (͜Ε Python ͷ lambda x: x ͷҙຯ) • ฒߦܭࢉϞσϧ: πܭࢉͳͲͷܭࢉܕΛ͏ • (͜Ενϟωϧ x ʹ ΛૹΔͱ͍͏ҙຯ) hbstyle 2016/06/09 - Yoshikawa Ryota ( @rrreeeyyy ) 9
·ͱΊ • ܗࣜख๏ʹೖͨ͠ • ΑΓ҆શͰݎ࿚ͳιϑτΣΞΛ࡞Δʹܗࣜख๏͕༗ޮͰ͋Δ • ݱঢ়͗͢͠Δ͕ʑͷۀͳͲʹద༻Ͱ͖ΔͷͰʁ • ιϑτΣΞςετͰঢ়ଶΛͯ͢ཏ͢Δͷ͍͠ •
ܕγεςϜϥϜμܭࢉπܭࢉීஈͷϓϩάϥϛϯάͱؔ࿈͍ͯͯ͠໘ന͍ • ͳͥ Rust ܕ҆શͱ͞Ε͍ͯΔͷ͔ʁͳͥ C ܕ҆શͰͳ͍ͷ͔ʁ • ͬͱܗࣜख๏͕؆୯ʹͳΕ͍͍ͳ͋ͱࢥ͍ͬͯΔ hbstyle 2016/06/09 - Yoshikawa Ryota ( @rrreeeyyy ) 10
ࢀߟࢿྉ • http://dl.acm.org/citation.cfm?id=2749359.2699417 • http://research.microsoft.com/en-us/um/people/lamport/tla/ amazon.html • https://brooker.co.za/blog/2014/08/09/formal-methods.html • http://brooker.co.za/blog/2015/03/29/formal.html
• https://www.infoq.com/presentations/aws-testing-tla • http://perspectives.mvdirona.com/2014/07/challenges-in-designing- at-scale-formal-methods-in-building-robust-distributed-systems/ hbstyle 2016/06/09 - Yoshikawa Ryota ( @rrreeeyyy ) 11