Professional Documents
Culture Documents
Writing Bug-Free Code Using Theorem Provers
Writing Bug-Free Code Using Theorem Provers
Writing Bug-Free Code Using Theorem Provers
Aaron Stump
Computer Science
The University of Iowa
1
Coding Bliss
2
Coding Bloodbath
3
What Makes Software Lousy?
• Unclear requirements
Bad interfaces, missing features, unnecessary features
• Bugs
Invariants broken, function contracts not met,
resources misused
4
What Makes Software Lousy?
• Unclear requirements
Bad interfaces, missing features, unnecessary features
• Bugs
Invariants broken, function contracts not met,
resources misused
5
Is error-free code impossible?
6
Current Practice: Testing
7
Current Practice: Testing
8
Current Practice: Testing
9
Current Practice: Testing
10
Current Practice: Testing
11
Current Practice: Testing
12
Current Practice: Testing
13
Current Practice: Testing
14
Current Practice: Testing
15
Current Practice: Testing
16
Current Practice: Testing
17
Current Practice: Testing
18
Current Practice: Testing
19
Current Practice: Testing
20
Current Practice: Testing
21
Current Practice: Testing
22
Testing Pros and Cons
23
Testing Pros and Cons
24
Q. Is there any way to prove the absence of bugs in code?
25
Q. Is there any way to prove the absence of bugs in code?
A. Yes, with a theorem prover!
26
Theorem-Proving Tools
• Have been around since the late 1970s
27
The Agda Theorem Prover
• From Chalmers U. of Technology, Sweden
demo
28
The Future of Programming?
• Revolutionize open-source
Anyone can be a committer
(Just require proofs on commit)
• Happier programmers
Proving software correct is awesome experience
Watching it actually run correctly even better!
29
Conclusion
Thank you!
30
The University of Iowa
Computing Conference (UICC)
• Outside speakers
• Programming/puzzle contest
http://acm.cs.uiowa.edu/uicc/schedule.html
31
CS Graduate Program at U. Iowa
• Master of Computer Science (MCS)
Improve credentials, knowledge, for industry
Typically 2 years, 10 grad classes
New for 2014: Regional Scholars Fellowship
Teaching assistantship for one academic year
Tuition, plus stipend (approx $2000/month)
Renewable for second year with GPA of 3.25
32