Cpen522 01
Cpen522 01
Ali Mesbah
ECE, UBC
Today’s Objectives
2
Contact Info
Lecturer: Dr. Ali Mesbah
Email: [email protected]
Office: KAISER 4044
Office hours: by appointment
3
Bio
4
Software AnaLysis and Testing (SALT)
http://salt.ece.ubc.ca
Teaching:
• Software construction Partners:
• Software verification • Collaboration with ~10
different companies
• AI4SE
5
6
Our Testing Research
7
8
Google
• Sabbatical (every 6 years)
• Visiting Scientist @ Google (8 months)
– Mountain View office
9
What I liked about my visit @ Google
10
What I liked about my visit @ Google
• The free food and snacks (of course)!
11
What I liked about my visit @ Google
• The colorful offices!
12
What I liked about my visit @ Google
• The amazing software dev. Infrastructure!
13
My research @ Google
• Learning to fix compilation errors automatically
– Machine learning, deep learning
– Neural Machine Translation
14
TA
15
Resources
• UBC Canvas
– See Syllabus
• GitHub (Lab work)
– https://github.com
– Create an account on GitHub if you don’t have one!
– Submit your account (see Canvas for
announcements).
16
Assessment
• Active Participation: 5%
• Seminar Presentations: 15%
• Midterm (February 28): 20%
• Lab Work: 30%
• Final Exam (April 10): 30%
17
Canvas
– Syllabus (read it!)
– Lecture notes after each lecture
– Announcements
– Q&A, discussions -> participation marks!
18
Active Participation
Active participation means
• class attendance,
• participation in the discussions in the class and
online
• asking good questions, responding to questions
asked
19
Student Presentations
• Each student presents once
• A topic on software verification and testing
(more details will follow soon)
20
Student Presentations
Topics:
1. A related technique
2. A tool, + demo
3. A paper/article
4. Industrial case studies
21
Lab Work
• Work in Groups
• Online lab meetings with TA
• Assignments: 3 parts
– Web Testing
– REST API
– Performance Testing
• Project: open-ended
22
Project
• Project
– A project proposed by you!
23
Lecture Style
24
Questions?
25
– What is software verification and testing?
– Why is it important?
26
Part II: Preliminaries
1946
30
“Our civilization runs on software”
31
“Software is eating the world”
32
“Software is eating the world”
Marc Andreessen (Netscape)
33
“AI is eating the world”
34
Software Dependability
More and more we depend on software
35
Boeing 787 (Dreamliner) bug
36
More examples of
software defects
37
More infamous examples
• NASA Mars Polar Lander destroyed
– its flight software mistook vibrations due to
atmospheric turbulence for evidence that the vehicle
had landed and shut off the engines 40 meters from
the Martian surface!
• Apple’s “goto fail” bug: a duplicated line of code
which caused a (SSL) public key certificate check
to pass a test incorrectly.
• Heartbleed, an OpenSSL vulnerability
– 900 SINs stolen from Canada Revenue 2014
38
39
“It's all done. I just need to test it.”
40
“It's all done. I just need to test it.”
41
CPEN 522:
Software Verification and Testing
42
This Course
• Techniques
– The basics to be effective
• Test design:
– Which test cases are likely to reveal errors?
• Test assessment:
– Have I tested enough? Are my tests good?
• Analysis techniques
– Control-flow analysis
– Data-flow analysis
– Static bug checkers
44
Textbook
47
Learning Objectives
• Knowledge level
– Raw facts: essential software analysis methods,
tools, techniques, ...
• Application level:
– Practical: actually use selected techniques
• Evaluation level:
– Analytical: Decide what’s useful in your project
– Criticize, analyze, investigate, reflect, innovate, ...
49
Questions?
50
Testing a SaaS
51