Model-based vs. Functional Program Specification and Correctness

Slides:



Advertisements
Similar presentations
The Important Thing About By. The Important Thing About ******** The important thing about ***** is *****. It is true s/he can *****, *****, and *****.
Advertisements

Functional Verification III Prepared by Stephen M. Thebaut, Ph.D. University of Florida Software Testing and Verification Lecture Notes 23.
White-Box Testing Techniques IV
Axiomatic Verification I Prepared by Stephen M. Thebaut, Ph.D. University of Florida Software Testing and Verification Lecture 17.
7.1 – Multiplying Monomials. x · x = x 1 · x 1 =
Python: Modularisation Damian Gordon. Modularisation Remember the prime checker program:
Exam 2 Help Session Prepared by Stephen M. Thebaut, Ph.D. University of Florida Software Testing and Verification.
Proofs of Correctness: An Introduction to Axiomatic Verification Prepared by Stephen M. Thebaut, Ph.D. University of Florida CEN 5035 Software Engineering.
computer
Parabola Quiz 10 Revision questions. Write the equation for this parabola #1.
5x 4 – 405 = 5(x 4 – 81) = 5(x 2 + 9)(x 2 – 9) = 5(x 2 + 9)(x + 3)(x – 3) by D. Fisher.
Requirements and Specifications Prepared by Stephen M. Thebaut, Ph.D. University of Florida Software Testing and Verification Lecture 3.
Requirements and Specifications Prepared by Stephen M. Thebaut, Ph.D. University of Florida Software Testing and Verification Lecture 3.
Functional Verification I Prepared by Stephen M. Thebaut, Ph.D. University of Florida Software Testing and Verification Lecture Notes 21.
White-Box Testing Techniques I Prepared by Stephen M. Thebaut, Ph.D. University of Florida Software Testing and Verification Lecture 7.
4.3 Solving Systems of Linear Inequalities 11/7/12.
Graphing Functions Mr.Kaslavage Grade 11 trig Mathematics.
Axiomatic Verification II Prepared by Stephen M. Thebaut, Ph.D. University of Florida Software Testing and Verification Lecture Notes 18.
11/22/2016IT 3271 A formal system:Axioms and Rules, for inferring valid specification x := m; y := n; while ¬(x=y) do if x>y then x := x-y else y := y-x.
Functional Verification III
White-Box Testing Techniques IV
White-Box Testing Techniques IV
Prepared by Stephen M. Thebaut, Ph.D. University of Florida
Case Study: Black-Box Testing
White-Box Testing Techniques II
Requirements and Specifications
Prepared by Stephen M. Thebaut, Ph.D. University of Florida
Functional Verification IV: Revisiting Loop Invariants
Predicate Transforms II
Functional Verification IV: Revisiting Loop Invariants
Functional Verification III
White-Box Testing Techniques III
Prepared by Stephen M. Thebaut, Ph.D. University of Florida
Formal Program Specification
Predicate Transforms I
White-Box Testing Techniques II
Functional Verification I
Exercise Solutions: Functional Verification
Thebaut’s Guaranteed Method Software Specification Lecture 5
Formal Program Specification
Prepared by Stephen M. Thebaut, Ph.D. University of Florida
Exercise Solutions: Functional Verification
Axiomatic Verification II
White-Box Testing Techniques III
Functional Verification I
White-Box Testing Techniques I
Axiomatic Verification II
Available at © University of Florida 2009.
Axiomatic Verification I
Proofs of Correctness: An Introduction to Axiomatic Verification
Functional Verification II
Functional Verification IV: Revisiting Loop Invariants
Axiomatic Verification I
Predicate Transforms I
Prepared by Stephen M. Thebaut, Ph.D. University of Florida
Functional Verification III
Predicate Transforms II
Functional Verification III
Algebraic Specification Software Specification Lecture 34
Problem Set 7: Functional Verification
Functional Verification IV: Revisiting Loop Invariants
G&W Preface Software Specification Lecture 4
½ of 6 = 3.
Predicate Transforms I
Prepared by Stephen M. Thebaut, Ph.D. University of Florida
Prepared by Stephen M. Thebaut, Ph.D. University of Florida
Black-Box Testing Techniques II
Formal Program Specification
Indicator 16 System of Equations.
python
Presentation transcript:

Model-based vs. Functional Program Specification and Correctness Software Testing and Verification Bonus Review Material Prepared by Stephen M. Thebaut, Ph.D. University of Florida

Model-based vs. Functional Specification {true} temp := x x := y y := temp {x=y’ Л y=x’ Л temp=x’} Comparable specified function (f): f = (x,y,temp := y,x,x) Function computed by the program ([S]): [S] = (x,y,temp := y,x,x) Is the program “correct”? {P} S {Q} ? {P} S {Q} strongly ? f = [S] ? f  [S] ?

Weakened Post-Condition {true} temp := x x := y y := temp {x=y’ Л y=x’} Comparable specified function (f): f = (x,y := y,x) Function computed by the program ([S]): [S] = (x,y,temp := y,x,x) Is the program “correct”? {P} S {Q} ? {P} S {Q} strongly ? f = [S] ? f  [S] ?

Strengthened Pre-Condition {x>0 Л y>0} temp := x x := y y := temp {x=y’ Л y=x’} Comparable specified function (f): (x>0 Л y>0  x,y := y,x) Function computed by the program ([S]): [S] = (x,y,temp := y,x,x) Is the program “correct”? {P} S {Q} ? {P} S {Q} strongly ? f = [S] ? f  [S] ?

A different program… {x>0 Л y>0} if (x>0 & y>0) then temp := x x := y y := temp end_if {x=y’ Л y=x’} Comparable specified function (f): (x>0 Л y>0  x,y := y,x) Function computed by the program ([S]): (x>0 Л y>0  x,y,temp := y,x,x | true  I) Is the program “correct”? {P} S {Q} ? {P} S {Q} strongly ? f = [S] ? f  [S] ?

A really different program… {x>0 Л y>0} if (x>0 & y>0) then temp := x x := y y := temp else while (1=1) do no-op end_while end_if_else {x=y’ Л y=x’} Comparable specified function (f): (x>0 Л y>0  x,y := y,x) Function computed by the program ([S]): (x>0 Л y>0  x,y,temp := y,x,x) Is the program “correct”? {P} S {Q} ? {P} S {Q} strongly ? f = [S] ? f  [S] ?

Pre-condition weakened again {true} if (x>0 & y>0) then temp := x x := y y := temp else while (1=1) do no-op end_while end_if_else {x=y’ Л y=x’} Comparable specified function (f): f = (x,y := y,x) Function computed by the program ([S]): (x>0 Л y>0  x,y,temp := y,x,x) Is the program “correct”? {P} S {Q} ? {P} S {Q} strongly ? f = [S] ? f  [S] ?

Model-based vs. Functional Program Specification and Correctness Software Testing and Verification Bonus Review Material Prepared by Stephen M. Thebaut, Ph.D. University of Florida