Professional Documents
Culture Documents
Formal Methods in
Software Engineering
Introduction
By
Rubina Shaheen
2/33
Importance of Software
E MBEDDED S OFTWARE
E MBEDDED S OFTWARE
E MBEDDED S OFTWARE
Car software:
The GM Volt contains +10M lines of code: how do you verify
that?
Current cars admit hundreds of onboard functions: how do
you cover their combination?
E.g., does braking when changing the radio station and
starting the windscreen wiper, affect air conditioning?
6/33
O BSERVATION
• Correct
• Reliable
12/33
LIMITATIONS OF T ESTING
A Sorting Program:
i n t * sort(i n t * a) {
...
}
14/33
A Sorting Program:
i n t * sort(i n t * a) {
...
}
Testing sort:
√
sort({3, 2, 5}) == {2, 3, 5}
√
sort({}) == {}
√
sort({17}) == {17}
14/33
A Sorting Program:
i n t * sort(i n t * a) {
...
}
A W ARNING
But ….
• Formal proof can replace (infinitely) many test cases