















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
















Why Formal Methods are required
Softwares encountered notorious (infamous) bugs that were the cause of financial lose and deaths of many people. Famous bugs are (^) Therac- (^) computerized radiation therapy machine called the Therac-25. (^) killed many people, controller could not stop radiation due to software bug, later on the problem was fixed, after killing many people life. (^) AT & T long distance breakdown bug 1990 (^) ill placed break statement in the code, (^) caused the 1/3rd of entire American network to go down for 9 hours. (^) Loses to banks, for ATM and transactions
Why Formal Methods are required Patriot Missile Failure Gulf war (^) this missile hit the own American troops a software defect in 1991. (^) Killing 28 people and many injured Pentium bug (^) software error in microcode of Pentium microprocessor, which resulted in error of floating point calculations problems. (^) Intel had to take back all the Pentiums, and it caused huge loss of dollars.
Importance of formal methods in Software
(^) Correct Reliable
Testing Verification Validation
Black box testing Test input versus output Input (^) Two numbers Output (^) average White box testing Test the structure of program. (^) For loops testing, condition testing
"Testing can show the presence of errors, but not their absence."
In testing we develop test cases and define scenarios, it is not possible to have all scenarios. Program to show equalness of two strings. isEqual(“cat”,”dog”) expected false isEqual(“testing”,”testing”) expected true isEqual(“house”,”home”) expected false isEqual(“house”,”mouse”) expected false. No number of test cases assure this.
Mathematical Practices for Proving a statement
All numbers are less than one thousand theorem # 01 Examples to prove this theorem (^) 1<1000, 2<1000, (^) 50< (^) So and so far infinite examples it is not possible that proves the theorem. If the theorem is incorrect or correct ,to prove it, we can use the formal method.
Obviously there is no guarantee in life but every one wants to have reliable software. A report was presented to President Bill Clinton in 1996 by committee of IT, in which they stated
If ,You fly in a plane 100 times plane crashes 5 times due to software error then ,will you travel through plane?
(^) he shakes the urn and, without looking, he takes two balls from the urn; (^) if those two balls have the same color (^) he throws one black ball into the urn, (^) otherwise he returns one white ball into the urn (^) Because each move decreases the total number of balls into the urn by 1, the game is guaranteed to terminate after a finite number of moves and it is not difficult to see that the game ends with exactly 1 ball in the urn.
(^) What can we say about the color of the final ball when we are given the initial contents of the urn?’”
One ball game The game will end without playing Two balls game Three different combinations of balls One Black, one white One White ,one white One Black, one black
two ball game Dijkstra’s game contd..