White-Box Testing Techniques III

Size: px
Start display at page:

Download "White-Box Testing Techniques III"

Transcription

1 White-Box Testing Techniques III Software Testing and Verification Lecture 9 Prepared by Stephen M. Thebaut, Ph.D. University of Florida

2 White-Box Testing Topics Logic coverage (lecture I) Dataflow coverage (lecture II) Path conditions and symbolic evaluation (lecture III) Other white-box testing strategies (e.g., fault-based testing ) (lecture IV)

3 Path Conditions With a little luck, at least some whitebox coverage goals will have been met by executing test cases designed using black-box strategies. (How would you know if this were the case or not?) Designing additional test cases for this purpose involves identifying inputs that will cause given program paths to be executed. This can be difficult...

4 Path Conditions (cont d) To cause a path to be executed requires that the test case satisfy the path condition. For a given path, the PATH CONDITION is the conjunction of branch predicates that are required to hold for all the branches along the path to be taken.

5 Consider an example (1) input(a,b) if (A>0) then (2) Z := A (3) Z := 0 if (B>0) then (4) Z := Z+B end_if (5) output(z) 3 F F 1 5 A>0 T 2 B>0 T 4 What is the path condition for path <1,2,5>?

6 Consider ANOTHER example (1) input(a,b) if (A>B) then (2) B := B*B end_if if (B<0) then (3) Z := A (4) Z := B (5) output(z) 4 F 1 A>B T F 2 5 B<0 T 3 What is the path condition for path <1,2,3,5>?

7 Conclusions To be useful, path conditions should be expressed in terms that reflect relevant state changes along the path. A path is INFEASIBLE if its path condition reduces to FALSE. Question: if a path is infeasible, does this imply the presence of dead code?

8 Symbolic Evaluation Symbolic evaluation provides a technique for systematically tracking state changes for the purpose of expressing path conditions in useful terms.

9 Notation A variable A will have a succession of symbolic values, A 0, A 1, A 2,..., as a path is traversed. Subscripts refer to the number of the previous program statement (or block of statements) executed, so some numbers may be skipped. With loops, statements may be executed more than once, so double subscripts will be used when necessary.

10 Notation (cont d) At each statement, the same notation is used to represent program variables regardless of path, but the symbolic values will usually be different. For example: The notation used for the symbolic value of variable X immediately after executing statement 5 is always denoted X 5 ; however, the symbolic value itself depends on which execution path is taken to statement 5.

11 Example 1 T if (X<=0) or (Y<=0) then (1) X := X**2 Y := Y**2 (2) X := X+1 Y := Y+1 T if (X<1) or (Y<1) then (3) X := X+1 Y := Y+1 (4) X := X-1 Y := Y-1 There are 4 paths. PATH T,T 2 (1) X 1 = X 0 2 Y 1 = Y 0 (3) X 3 = X = X Y 3 = Y = Y

12 Example 1 (cont d) T if (X<=0) or (Y<=0) then (1) X := X**2 Y := Y**2 (2) X := X+1 Y := Y+1 F if (X<1) or (Y<1) then (3) X := X+1 Y := Y+1 (4) X := X-1 Y := Y-1 There are 4 paths. PATH T,F 2 (1) X 1 = X 0 2 Y 1 = Y 0 (4) X 4 = X 1-1 = X Y 4 = Y 1-1 = Y 2 0-1

13 Example 1 (cont d) F if (X<=0) or (Y<=0) then (1) X := X**2 Y := Y**2 (2) X := X+1 Y := Y+1 T if (X<1) or (Y<1) then (3) X := X+1 Y := Y+1 (4) X := X-1 Y := Y-1 There are 4 paths. PATH F,T (2) X 2 = X Y 2 = Y (3) X 3 = X = X Y 3 = Y = Y 0 + 2

14 Example 1 (cont d) F if (X<=0) or (Y<=0) then (1) X := X**2 Y := Y**2 (2) X := X+1 Y := Y+1 F if (X<1) or (Y<1) then (3) X := X+1 Y := Y+1 (4) X := X-1 Y := Y-1 There are 4 paths. PATH F,F (2) X 2 = X Y 2 = Y (4) X 4 = X 2-1 = X 0 Y 4 = Y 2-1 = Y 0

15 Path Conditions Revisited Having symbolically evaluated the program variables along a path, we can now symbolically represent the branch predicates that are required to hold in order for the path to be traversed. The symbolic variable values used in each branch predicate are the values which the variables have when the branch predicate is encountered.

16 Path Conditions Revisited To simplify the task of identifying inputs that will cause the path to be executed, path conditions should be expressed in terms of the initial symbolic values of variables.

17 Example 1 (revisited) T if (X<=0) or (Y<=0) then (1) X := X**2 Y := Y**2 (2) X := X+1 Y := Y+1 T if (X<1) or (Y<1) then (3) X := X+1 Y := Y+1 (4) X := X-1 Y := Y-1 PATH T,T Variable values: X 1 = X 0 2 Y 1 = Y 0 2 X 3 = X Y 3 = Y Path Condition: = ((X 0 0) or (Y 0 0)) and ((X 1 < 1) or (Y 1 < 1)) = ((X 0 0) or (Y 0 0)) and ((X 0 2 < 1) or (Y 0 2 < 1)) = ((X 0 0) or (Y 0 0) ) and ((-1 < X 0 < 1) or (-1 < Y 0 < 1))

18 Example 1 (revisited) T if (X<=0) or (Y<=0) then (1) X := X**2 Y := Y**2 (2) X := X+1 Y := Y+1 F if (X<1) or (Y<1) then (3) X := X+1 Y := Y+1 (4) X := X-1 Y := Y-1 PATH T,F Variable values: X 1 = X 0 2 Y 1 = Y 0 2 X 4 = X Y 4 = Y Path Condition: = ((X 0 0) or (Y 0 0)) and ((X 1 1) and (Y 1 1)) = ((X 0 0) or (Y 0 0)) and ((X 0 2 1) and (Y 0 2 1)) = ((X 0 0) or (Y 0 0)) and ((X 0-1) or (X 0 1)) and ((Y 0-1) or (Y 0 1))

19 Example 1 (revisited) F if (X<=0) or (Y<=0) then (1) X := X**2 Y := Y**2 (2) X := X+1 Y := Y+1 T if (X<1) or (Y<1) then (3) X := X+1 Y := Y+1 (4) X := X-1 Y := Y-1 PATH F,T Variable values: X 2 = X Y 2 = Y X 3 = X Y 3 = Y Path Condition: = ((X 0 > 0) and (Y 0 > 0)) and ((X 2 < 1) or (Y 2 < 1)) = ((X 0 > 0) and (Y 0 > 0)) and ((X < 1) or (Y < 1)) = ((X 0 > 0) and (Y 0 > 0)) and ((X 0 < 0) or (Y 0 < 0)) = FALSE

20 Example 1 (revisited) F if (X<=0) or (Y<=0) then (1) X := X**2 Y := Y**2 (2) X := X+1 Y := Y+1 F if (X<1) or (Y<1) then (3) X := X+1 Y := Y+1 (4) X := X-1 Y := Y-1 PATH F,F Variable values: X 2 = X Y 2 = Y X 4 = X 0 Y 4 = Y 0 Path Condition: = ((X 0 > 0) and (Y 0 > 0)) and ((X 2 1) and (Y 2 1)) = ((X 0 > 0) and (Y 0 > 0)) and ((X ) and (Y )) = ((X 0 > 0) and (Y 0 > 0)) and ((X 0 0) and (Y 0 0)) = (X 0 > 0) and (Y 0 > 0)

21 Summary of Path Conditions TT: ((X 0 0) or (Y 0 0) ) and ((-1 < X 0 < 1) or (-1 < Y 0 < 1)) TF: ((X 0 0) or (Y 0 0)) and ((X 0-1) or (X 0 1)) and ((Y 0-1) or (Y 0 1)) FT: FALSE FF: (X 0 > 0) and (Y 0 > 0) The path domains in the (X 0,Y 0 ) plane may also be depicted graphically.

22 Graph of Path Domains Y 0 TF Y 0 = 1 FF TT X 0 Y 0 = -1 X 0 = -1 X 0 = 1

23 Incremental Generation of Path Conditions Path conditions can also be generated incrementally, by considering the branches taken in a piecemeal fashion.

24 Example 2 if (B > A+1) then (1) A := A+1 (2) B := B-1 if (B > -A+2) then (3) A := A+2 (4) B := B+1 if (B <= 0) then... T PARTIAL PATH T Variable values: A 0, B 0 Partial path condition: (B 0 > A 0 +1)

25 Example 2 if (B > A+1) then (1) A := A+1 (2) B := B-1 if (B > -A+2) then (3) A := A+2 (4) B := B+1 if (B <= 0) then... F PARTIAL PATH F Variable values: A 0, B 0 Partial path condition: (B 0 A 0 +1)

26 Partial Path Domains B 0 T A 0 B 0 = A F

27 Example 2 (cont d) if (B > A+1) then (1) A := A+1 (2) B := B-1 if (B > -A+2) then (3) A := A+2 (4) B := B+1 if (B <= 0) then... T T PARTIAL PATH TT Variable values: A 1 = A 0 +1 B 1 = B 0 Partial path condition: (B 0 > A 0 +1) and (B 1 > -A 1 +2) = (B 0 > A 0 +1) and (B 0 > -A 0 +1)

28 Example 2 (cont d) if (B > A+1) then (1) A := A+1 (2) B := B-1 if (B > -A+2) then (3) A := A+2 (4) B := B+1 if (B <= 0) then... T F PARTIAL PATH TF Variable values: A 1 = A 0 +1 B 1 = B 0 Partial path condition: (B 0 > A 0 +1) and (B 1 -A 1 +2) = (B 0 > A 0 +1) and (B 0 -A 0 +1)

29 Example 2 (cont d) if (B > A+1) then (1) A := A+1 (2) B := B-1 if (B > -A+2) then (3) A := A+2 (4) B := B+1 if (B <= 0) then... F T PARTIAL PATH FT Variable values: A 2 = A 0 B 2 = B 0-1 Partial path condition: (B 0 A 0 +1) and (B 2 > -A 2 +2) = (B 0 A 0 +1) and (B 0 > -A 0 +3)

30 Example 2 (cont d) if (B > A+1) then (1) A := A+1 (2) B := B-1 if (B > -A+2) then (3) A := A+2 (4) B := B+1 if (B <= 0) then... F F PARTIAL PATH FF Variable values: A 2 = A 0 B 2 = B 0-1 Partial path condition: (B 0 A 0 +1) and (B 2 -A 2 +2) = (B 0 A 0 +1) and (B 0 -A 0 +3)

31 Partial Path Domains (cont d) B 0 = -A TF B 0 TT FT A 0 B 0 = A FF B 0 = -A 0 + 3

32 Example 2 (cont d) if (B > A+1) then (1) A := A+1 (2) B := B-1 if (B > -A+2) then (3) A := A+2 (4) B := B+1 if (B <= 0) then... T T T PARTIAL PATH TTT Variable values: A 1 = A 0 +1 A 3 = A = A B 3 = B 1 = B 0 Partial path condition: (B 0 > A 0 +1) and (B 0 > -A 0 +1) and (B 3 0) = (B 0 0) = FALSE

33 Loops In general, the simplification of path conditions involving loops is very difficult. The simplest form that is obtainable for N iterations of a loop may involve N terms. N iterations = While loop body executes N-1 times Repeat_Until loop body executes N times

34 Example 3 (1) C := 0 while (X>=Y) do (2) X := X-Y C := C+1 end_while Variable values: (Y does not change) (1) X 1 = X 0 C 1 = 0 (2,1) X 2,1 = X 1 Y 1 = X 0 Y 0 C 2,1 = C = 1 (2,2) X 2,2 = X 2,1 Y 2,1 = (X 0 Y 0 ) - Y 0 = X 0 2Y 0 C 2,2 = C 2,1 + 1 = 2

35 Example 3 (cont d) (1) C := 0 while (X>=Y) do (2) X := X-Y C := C+1 end_while Variable values: (cont d) (2,2) X 2,2 = X 0 2Y 0 C 2,2 = 2 (2,3) X 2,3 = X 2,2 Y 2,2 = (X 0 2Y 0 ) - Y 0 = X 0 3Y 0 C 2,3 = C 2,2 + 1 = 3 (2,N) X 2,N = X 0 NY 0 C 2,N = N

36 Example 3 (cont d) Path Condition for Path F: (loop body executed 0 times) (X 1 < Y 1 ) = X 0 < Y 0 Path Condition for Path T,F: (loop body executed 1 time) (X 1 Y 1 ) and (X 2,1 < Y 2,1 ) = (X 0 Y 0 ) and (X 0 - Y 0 < Y 0 ) = (X 0 Y 0 ) and (X 0 < 2Y 0 ) = Y 0 X 0 < 2Y 0 (1) C := 0 while (X>=Y) do (2) X := X-Y C := C+1 end_while Variable values: X 1 = X 0 C 1 = 0 X 2,N = X 0 NY 0 C 2,N = N

37 Example 3 (cont d) Variable values: X 1 = X 0 C 1 = 0 X 2,N = X 0 NY 0 C 2,N = N (1) C := 0 while (X>=Y) do (2) X := X-Y C := C+1 end_while Path Condition for Path T,T,F: (loop body executed 2 times) (X 1 Y 1 ) and (X 2,1 Y 2,1 ) and (X 2,2 < Y 2,2 ) = (X 0 Y 0 ) and (X 0 - Y 0 Y 0 ) and (X 0-2Y 0 < Y 0 ) = (X 0 Y 0 ) and (X 0 2Y 0 ) and (X 0 < 3Y 0 ) = (X 0 Y 0 ) and (2Y 0 X 0 < 3Y 0 ) = 2Y 0 X 0 < 3Y 0 since (2Y 0 < 3Y 0 ) => Y 0 > 0 => (X 0 2Y 0 => X 0 Y 0 )

38 Example 3 (cont d) Path Condition for N>1 iterations of the loop: (X 1 Y 1 ) and (X 2,1 Y 2,1 ) and and (X 2,N-1 Y 2,N-1 ) and (X 2,N < Y 2,N ) It can be proven by induction that this condition may be expressed in CLOSED FORM as: (N-1)Y 0 X 0 < NY 0 with the implied (eventual termination) condition that Y 0 > 0.

39 Path Conditions & Symbolic Evaluation Summary To cause a path to be executed requires that the test case satisfy its path condition. The path condition is the conjunction of branch predicates that are required to hold for all the branches along the path. In general, the simplification of path conditions for loops is very difficult. (The simplest form that is obtainable for N iterations of a loop may involve N terms.)

40 Path Conditions & Symbolic Evaluation Summary (cont d) A path is infeasible if its path condition reduces to FALSE. Symbolic evaluation provides a systematic method for expressing path conditions in terms of the initial symbolic values of program variables.

41 Path Conditions & Symbolic Evaluation Summary (cont d) This simplifies the task of identifying inputs that will cause the path to be executed. But this satisfiability problem can be very difficult to solve

42 Exactly HOW Difficult? Given a Boolean expression E, decide if there is some assignment to the variables in E such that E will be true. This was the first problem shown to be NP-complete!

43 White-Box Testing Techniques III Software Testing and Verification Lecture 9 Prepared by Stephen M. Thebaut, Ph.D. University of Florida

White-Box Testing Techniques II

White-Box Testing Techniques II White-Box Testing Techniques II Software Testing and Verification Lecture 8 Prepared by Stephen M. Thebaut, Ph.D. University of Florida White-Box Testing Topics Logic coverage (lecture I) Dataflow coverage

More information

Course Wrap-Up. Software Testing and Verification. Stephen M. Thebaut, Ph.D. Prepared by. University of Florida

Course Wrap-Up. Software Testing and Verification. Stephen M. Thebaut, Ph.D. Prepared by. University of Florida Course Wrap-Up Software Testing and Verification Prepared by Stephen M. Thebaut, Ph.D. University of Florida A few loose ends Final Exam + solution notes will be posted (under Practice Exams ) ASAP probably

More information

MTAT : Software Testing

MTAT : Software Testing MTAT.03.159: Software Testing Lecture 03: White-Box Testing (Textbook Ch. 5) Dietmar Pfahl Spring 2017 email: dietmar.pfahl@ut.ee Lecture Chapter 5 White-box testing techniques (Lab 3) Structure of Lecture

More information

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus: Boolean Algebra and Simplification CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus Topics Motivation: Simplifying Conditional Expressions

More information

Software Testing part II (white box) Lecturer: Giuseppe Santucci

Software Testing part II (white box) Lecturer: Giuseppe Santucci Software Testing part II (white box) Lecturer: Giuseppe Santucci 4. White box testing White-box (or Glass-box) testing: general characteristics Statement coverage Decision coverage Condition coverage Decision

More information

Symbolic Evaluation/Execution

Symbolic Evaluation/Execution Symbolic Evaluation/Execution Reading Assignment *R.W. Floyd, "Assigning Meaning to Programs, Symposium on Applied Mathematics, 1967, pp. 19-32 (Appeared as volume 19 of Mathematical Aspects of Computer

More information

While Loops CHAPTER 5: LOOP STRUCTURES. While Loops. While Loops 2/7/2013

While Loops CHAPTER 5: LOOP STRUCTURES. While Loops. While Loops 2/7/2013 While Loops A loop performs an iteration or repetition A while loop is the simplest form of a loop Occurs when a condition is true CHAPTER 5: LOOP STRUCTURES Introduction to Computer Science Using Ruby

More information

Reading Assignment. Symbolic Evaluation/Execution. Move from Dynamic Analysis to Static Analysis. Move from Dynamic Analysis to Static Analysis

Reading Assignment. Symbolic Evaluation/Execution. Move from Dynamic Analysis to Static Analysis. Move from Dynamic Analysis to Static Analysis Reading Assignment Symbolic Evaluation/Execution *R.W. Floyd, "Assigning Meaning to Programs, Symposium on Applied Mathematics, 1967, pp. 19-32 (Appeared as volume 19 of Mathematical Aspects of Computer

More information

Propositional Calculus. Math Foundations of Computer Science

Propositional Calculus. Math Foundations of Computer Science Propositional Calculus Math Foundations of Computer Science Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they can use it to

More information

CS 267: Automated Verification. Lecture 13: Bounded Model Checking. Instructor: Tevfik Bultan

CS 267: Automated Verification. Lecture 13: Bounded Model Checking. Instructor: Tevfik Bultan CS 267: Automated Verification Lecture 13: Bounded Model Checking Instructor: Tevfik Bultan Remember Symbolic Model Checking Represent sets of states and the transition relation as Boolean logic formulas

More information

Software Verification and Validation. Prof. Lionel Briand Ph.D., IEEE Fellow

Software Verification and Validation. Prof. Lionel Briand Ph.D., IEEE Fellow Software Verification and Validation Prof. Lionel Briand Ph.D., IEEE Fellow 1 White-Box Testing 2 White-Box vs. Black-BoxTesting: Reminder Software Representation (Model) Associated Criteria Test cases

More information

MTAT : Software Testing

MTAT : Software Testing MTAT.03.159: Software Testing Lecture 03: White-Box Testing (Textbook Ch. 5) Spring 2013 Dietmar Pfahl email: dietmar.pfahl@ut.ee Lecture Chapter 5 White-box testing techniques (Lab 3) Structure of Lecture

More information

MTAT : Software Testing

MTAT : Software Testing MTAT.03.159: Software Testing Lecture 03: White-Box Testing (Textbook Ch. 5) Dietmar Pfahl Spring 2016 email: dietmar.pfahl@ut.ee Lecture Chapter 5 White-box testing techniques (Lab 3) Structure of Lecture

More information

LECTURE 11 TEST DESIGN TECHNIQUES IV

LECTURE 11 TEST DESIGN TECHNIQUES IV Code Coverage Testing 1. Statement coverage testing 2. Branch coverage testing 3. Conditional coverage testing LECTURE 11 TEST DESIGN TECHNIQUES IV Code Complexity Testing 1. Cyclomatic Complexity s V

More information

Propositional Calculus. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Propositional Calculus. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus

More information

SE 3S03. Zahra Ali. Week of Feb 22, 2016

SE 3S03. Zahra Ali. Week of Feb 22, 2016 SE 3S03 Department of Computing and Software McMaster University Week of Feb 22, 2016 Coverage Coverage 1/34 Outline Coverage Coverage Coverage Coverage 2/34 Recall that means using the information about

More information

Introduction to Dynamic Analysis

Introduction to Dynamic Analysis Introduction to Dynamic Analysis Reading assignment Gary T. Leavens, Yoonsik Cheon, "Design by Contract with JML," draft paper, http://www.eecs.ucf.edu/~leavens/jml//jmldbc.pdf G. Kudrjavets, N. Nagappan,

More information

SE 3S03 - Tutorial 10. Helen Brown. Week of Mar 23, 2015

SE 3S03 - Tutorial 10. Helen Brown. Week of Mar 23, 2015 SE 3S03 - Tutorial 10 Department of Computing and Software McMaster University Week of Mar 23, 2015 : Acknowledgments: The material of these slides is based on [1] 1/34 Outline Edge : Path : 2/34 Recall

More information

Cleanroom Software Engineering

Cleanroom Software Engineering Cleanroom Software Engineering Software Testing and Verification Lecture 25 Prepared by Stephen M. Thebaut, Ph.D. University of Florida Required Reading and Additional Reference Required Reading: Linger,

More information

Exercises on Semantics of Programming Languages

Exercises on Semantics of Programming Languages Technische Universität Wien SS 2014 Fakultät für Informatik Repetition sheet Assist. Prof. Florian Zuleger Tuesday, 8 April 2014 Assist. Prof. Georg Weissenbacher Univ. Prof. Agata Ciabattoni Moritz Sinn,

More information

Global Optimization. Lecture Outline. Global flow analysis. Global constant propagation. Liveness analysis. Local Optimization. Global Optimization

Global Optimization. Lecture Outline. Global flow analysis. Global constant propagation. Liveness analysis. Local Optimization. Global Optimization Lecture Outline Global Optimization Global flow analysis Global constant propagation Liveness analysis Compiler Design I (2011) 2 Local Optimization Recall the simple basic-block optimizations Constant

More information

Software Testing Fundamentals. Software Testing Techniques. Information Flow in Testing. Testing Objectives

Software Testing Fundamentals. Software Testing Techniques. Information Flow in Testing. Testing Objectives Software Testing Fundamentals Software Testing Techniques Peter Lo Software Testing is a critical element of software quality assurance and represents the ultimate review of specification, design and coding.

More information

Lecture 26: Testing. Software Engineering ITCS 3155 Fall Dr. Jamie Payton

Lecture 26: Testing. Software Engineering ITCS 3155 Fall Dr. Jamie Payton Lecture 26: Testing Software Engineering ITCS 3155 Fall 2008 Dr. Jamie Payton Department of Computer Science University of North Carolina at Charlotte Dec. 9, 2008 Verification vs validation Verification:

More information

Testing Process and Methods. CS 490MT/5555, Spring 2017, Yongjie Zheng

Testing Process and Methods. CS 490MT/5555, Spring 2017, Yongjie Zheng Testing Process and Methods CS 490MT/5555, Spring 2017, Yongjie Zheng Context of Software Testing Verification & Validation Verification: checking that the software conforms to its specification. Validation:

More information

Cleanroom Software Engineering

Cleanroom Software Engineering Cleanroom Software Engineering Software Testing and Verification Lecture 25 Prepared by Stephen M. Thebaut, Ph.D. University of Florida Required Reading and Additional Reference Required Reading: Linger,

More information

Fachgebiet Softwaretechnik, Heinz Nixdorf Institut, Universität Paderborn. 4. Testing

Fachgebiet Softwaretechnik, Heinz Nixdorf Institut, Universität Paderborn. 4. Testing 4. vs. Model Checking (usually) means checking the correctness of source code Model Checking means verifying the properties of a model given in some formal (not program code) notation Attention: things

More information

CSE Section 10 - Dataflow and Single Static Assignment - Solutions

CSE Section 10 - Dataflow and Single Static Assignment - Solutions CSE 401 - Section 10 - Dataflow and Single Static Assignment - Solutions 1. Dataflow Review For each of the following optimizations, list the dataflow analysis that would be most directly applicable. You

More information

Path Testing + Coverage. Chapter 8

Path Testing + Coverage. Chapter 8 Path Testing + Coverage Chapter 8 Structural Testing n Also known as glass/white/open box testing n A software testing technique whereby explicit knowledge of the internal workings of the item being tested

More information

Requirements and Specifications

Requirements and Specifications Requirements and Specifications Software Testing and Verification Lecture 3 Prepared by Stephen M. Thebaut, Ph.D. University of Florida What are Requirements and Specifications? Requirement: something

More information

An Introduction to Systematic Software Testing. Robert France CSU

An Introduction to Systematic Software Testing. Robert France CSU An Introduction to Systematic Software Testing Robert France CSU Why do we need to systematically test software? Poor quality products can Inconvenience direct and indirect users Result in severe financial

More information

MTAT : Software Testing

MTAT : Software Testing MTAT.03.159: Software Testing Lecture 04: White-Box Testing (advanced) Part1 Dietmar Pfahl Spring 2018 email: dietmar.pfahl@ut.ee White-Box Testing Techniques Control-Flow Testing Data-Flow Testing Mutation

More information

Aerospace Software Engineering

Aerospace Software Engineering 16.35 Aerospace Software Engineering Verification & Validation Prof. Kristina Lundqvist Dept. of Aero/Astro, MIT Would You...... trust a completely-automated nuclear power plant?... trust a completely-automated

More information

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University Logic Design First Stage Lecture No.6 Boolean Algebra Bawar Abid Abdalla Assistant Lecturer Software Engineering Department Koya University Outlines Boolean Operations Laws of Boolean Algebra Rules of

More information

MTAT : Software Testing

MTAT : Software Testing MTAT.03.159: Software Testing Lecture 02: Basic Black-Box and White-Box Testing Techniques (Textbook Ch. 4 & 5) Spring 2018 Dietmar Pfahl email: dietmar.pfahl@ut.ee Structure of Lecture 2 Black-Box vs.

More information

MATVEC: MATRIX-VECTOR COMPUTATION LANGUAGE REFERENCE MANUAL. John C. Murphy jcm2105 Programming Languages and Translators Professor Stephen Edwards

MATVEC: MATRIX-VECTOR COMPUTATION LANGUAGE REFERENCE MANUAL. John C. Murphy jcm2105 Programming Languages and Translators Professor Stephen Edwards MATVEC: MATRIX-VECTOR COMPUTATION LANGUAGE REFERENCE MANUAL John C. Murphy jcm2105 Programming Languages and Translators Professor Stephen Edwards Language Reference Manual Introduction The purpose of

More information

CS 115 Lecture. Boolean logic Taken from notes by Dr. Neil Moore

CS 115 Lecture. Boolean logic Taken from notes by Dr. Neil Moore CS 115 Lecture Boolean logic Taken from notes by Dr. Neil Moore Boolean logic and logical operators There are three logical operators that let us combine Boolean expressions. They have lower precedence

More information

Case Study: Black-Box Testing

Case Study: Black-Box Testing Case Study: Black-Box Testing Software Testing and Verification Lecture 6.1 Prepared by Stephen M. Thebaut, Ph.D. University of Florida Boom! Bang! Pow! The following case study illustrates the application

More information

MTAT : Software Testing

MTAT : Software Testing MTAT.03.159: Software Testing Lecture 02: Basic Black-Box and White-Box Testing Techniques (Textbook Ch. 4 & 5) Spring 2018 Dietmar Pfahl email: dietmar.pfahl@ut.ee Structure of Lecture 2 Black-Box vs.

More information

Verification Overview Testing Theory and Principles Testing in Practice. Verification. Miaoqing Huang University of Arkansas 1 / 80

Verification Overview Testing Theory and Principles Testing in Practice. Verification. Miaoqing Huang University of Arkansas 1 / 80 1 / 80 Verification Miaoqing Huang University of Arkansas Outline 1 Verification Overview 2 Testing Theory and Principles Theoretical Foundations of Testing Empirical Testing Principles 3 Testing in Practice

More information

Static Analysis. Xiangyu Zhang

Static Analysis. Xiangyu Zhang Static Analysis Xiangyu Zhang Intuition Instead of concretely executing the program, let s statically execute/traverse it Instead of producing concrete execution states, let s have abstract state related

More information

Standard Boolean Forms

Standard Boolean Forms Standard Boolean Forms In this section, we develop the idea of standard forms of Boolean expressions. In part, these forms are based on some standard Boolean simplification rules. Standard forms are either

More information

CMSC 330: Organization of Programming Languages. Formal Semantics of a Prog. Lang. Specifying Syntax, Semantics

CMSC 330: Organization of Programming Languages. Formal Semantics of a Prog. Lang. Specifying Syntax, Semantics Recall Architecture of Compilers, Interpreters CMSC 330: Organization of Programming Languages Source Scanner Parser Static Analyzer Operational Semantics Intermediate Representation Front End Back End

More information

IR Lowering. Notation. Lowering Methodology. Nested Expressions. Nested Statements CS412/CS413. Introduction to Compilers Tim Teitelbaum

IR Lowering. Notation. Lowering Methodology. Nested Expressions. Nested Statements CS412/CS413. Introduction to Compilers Tim Teitelbaum IR Lowering CS412/CS413 Introduction to Compilers Tim Teitelbaum Lecture 19: Efficient IL Lowering 7 March 07 Use temporary variables for the translation Temporary variables in the Low IR store intermediate

More information

EASI Modeling in Focus

EASI Modeling in Focus EASI Modeling in Focus TUTORIAL EASI Modeling in Focus operates on a single input file, which you select from the drop-down list in the Modeling window. The basic steps required to run a simple model are

More information

Agenda. Predicate Testing. CSE 5321/4321, Ali Sharifara, UTA

Agenda. Predicate Testing. CSE 5321/4321, Ali Sharifara, UTA Agenda Predicate Testing CSE 5321/4321, Ali Sharifara, UTA 1 Predicate Testing Introduction Basic Concepts Predicate Coverage Summary CSE 5321/4321, Ali Sharifara, UTA 2 Motivation Predicates are expressions

More information

Dataflow-based Coverage Criteria

Dataflow-based Coverage Criteria Dataflow-based Coverage Criteria W. Eric Wong Department of Computer Science The University of Texas at Dallas ewong@utdallas.edu http://www.utdallas.edu/~ewong Dataflow-based Coverage Criteria ( 2012

More information

CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 19: Efficient IL Lowering 5 March 08

CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 19: Efficient IL Lowering 5 March 08 CS412/CS413 Introduction to Compilers Tim Teitelbaum Lecture 19: Efficient IL Lowering 5 March 08 CS 412/413 Spring 2008 Introduction to Compilers 1 IR Lowering Use temporary variables for the translation

More information

White Box Testing III

White Box Testing III White Box Testing III Outline Today we continue our look at white box testing methods, with mutation testing We will look at : definition and role of mutation testing what is a mutation? how is mutation

More information

Overview. State-of-the-Art. Relative cost of error correction. CS 619 Introduction to OO Design and Development. Testing.

Overview. State-of-the-Art. Relative cost of error correction. CS 619 Introduction to OO Design and Development. Testing. Overview CS 619 Introduction to OO Design and Development ing! Preliminaries! All sorts of test techniques! Comparison of test techniques! Software reliability Fall 2012! Main issues: There are a great

More information

Module 3: New types of data

Module 3: New types of data Module 3: New types of data Readings: Sections 4 and 5 of HtDP. A Racket program applies functions to values to compute new values. These new values may in turn be supplied as arguments to other functions.

More information

Propositional Calculus. Math Foundations of Computer Science

Propositional Calculus. Math Foundations of Computer Science Propositional Calculus Math Foundations of Computer Science Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they can use it to

More information

COS 598C - Advanced Compilers

COS 598C - Advanced Compilers Lecture 4: Control Flow Optimization COS 598C Advanced Compilers Reducible Flow Graphs!"# $ &## bb1 Nonreducible! bb2 bb3 Back to Loops Assembly Generation Schema for (i=x; i

More information

Test s in i g n III Week 16

Test s in i g n III Week 16 Testing III Week 16 Agenda (Lecture) White box testing Condition coverage Loop coverage Path coverage Agenda (Lab) Implementation Review of SRS/SDD documents Submit a weekly project progress report at

More information

NAME (from your UF ID): UF ID#: (Please PRINT) Quiz 1 -- Spring 2017

NAME (from your UF ID): UF ID#: (Please PRINT) Quiz 1 -- Spring 2017 NAME (from your UF ID): UF ID#: (Please PRINT) -------------------- CEN 4072/6070 Software Testing & Verification ------------------ Quiz 1 -- Spring 2017 You have 30 minutes to work on this exam. It is

More information

What is Structural Testing?

What is Structural Testing? Structural Testing What is Structural Testing? Based on Source Code Examine the internal structure of the program Test cases are derived from an examination of program s logic Do not pay any attention

More information

(6-1) Iteration in C H&K Chapter 5. Instructor - Andrew S. O Fallon CptS 121 (February 11, 2019) Washington State University

(6-1) Iteration in C H&K Chapter 5. Instructor - Andrew S. O Fallon CptS 121 (February 11, 2019) Washington State University (6-1) Iteration in C H&K Chapter 5 Instructor - Andrew S. O Fallon CptS 121 (February 11, 2019) Washington State University Iterative Constructs (1) 2 Recall that algorithms are composed of three different

More information

Optimizations. Optimization Safety. Optimization Safety CS412/CS413. Introduction to Compilers Tim Teitelbaum

Optimizations. Optimization Safety. Optimization Safety CS412/CS413. Introduction to Compilers Tim Teitelbaum Optimizations CS412/CS413 Introduction to Compilers im eitelbaum Lecture 24: s 24 Mar 08 Code transformations to improve program Mainly: improve execution time Also: reduce program size Can be done at

More information

UNIT-4 Black Box & White Box Testing

UNIT-4 Black Box & White Box Testing Black Box & White Box Testing Black Box Testing (Functional testing) o Equivalence Partitioning o Boundary Value Analysis o Cause Effect Graphing White Box Testing (Structural testing) o Coverage Testing

More information

White-Box Testing Techniques

White-Box Testing Techniques T-76.5613 Software Testing and Quality Assurance Lecture 3, 18.9.2006 White-Box Testing Techniques SoberIT Content What are white-box testing techniques Control flow testing Statement coverage Branch coverage

More information

Lecture 8. Conditionals & Control Flow

Lecture 8. Conditionals & Control Flow Lecture 8 Conditionals & Control Flow Announcements For This Lecture Readings Sections 5.1-5.7 today Chapter 4 for Tuesday Assignment 2 Posted Today Written assignment Do while revising A1 Assignment 1

More information

Software Testing ETSN00

Software Testing ETSN00 Software Testing ETSN00 http://cs.lth.se/etsn20 Chapter 6, 9.2-9.6 Prof. Per Runeson Lecture Chapter 6: Domain Testing Chapter 9.2-9.6: Functional Testing Black-bo testing techniques (Lab 2) Types of Testing

More information

Software Testing. Software Testing

Software Testing. Software Testing Software Testing Software Testing Error: mistake made by the programmer/ developer Fault: a incorrect piece of code/document (i.e., bug) Failure: result of a fault Goal of software testing: Cause failures

More information

3. According to universal addressing, what is the address of vertex d? 4. According to universal addressing, what is the address of vertex f?

3. According to universal addressing, what is the address of vertex d? 4. According to universal addressing, what is the address of vertex f? 1. Prove: A full m-ary tree with i internal vertices contains n = mi + 1 vertices. 2. For a full m-ary tree with n vertices, i internal vertices, and l leaves, prove: (i) i = (n 1)/m and l = [(m 1)n +

More information

Philadelphia University Faculty of Information Technology Department of Computer Science. Computer Logic Design. By Dareen Hamoudeh.

Philadelphia University Faculty of Information Technology Department of Computer Science. Computer Logic Design. By Dareen Hamoudeh. Philadelphia University Faculty of Information Technology Department of Computer Science Computer Logic Design By Dareen Hamoudeh Dareen Hamoudeh 1 Canonical Forms (Standard Forms of Expression) Minterms

More information

Functional Testing (Black Box Testing)

Functional Testing (Black Box Testing) Functional Testing (Black Box Testing) In black box testing, program is treated as a black box. Implementation details do not matter. Takes a user point of view. Functional testing verifies that each function

More information

ABSTRACT I. INTRODUCTION

ABSTRACT I. INTRODUCTION International Journal of Scientific Research in Computer Science, Engineering and Information Technology 2017 IJSRCSEIT Volume 2 Issue 6 ISSN : 2456-3307 Covering All White Box Tests Using Basis Path Test

More information

Darshan Institute of Engineering & Technology for Diploma Studies

Darshan Institute of Engineering & Technology for Diploma Studies CODING Good software development organizations normally require their programmers to follow some welldefined and standard style of coding called coding standards. Most software development organizations

More information

CMPSCI 521/621 Homework 2 Solutions

CMPSCI 521/621 Homework 2 Solutions CMPSCI 521/621 Homework 2 Solutions Problem 1 Direct data dependencies: 3 is directly data dependent on 1 and 5 5 is directly data dependent on 1,3, and 5 7 is directly data dependent on 1,3, and 5 Note,

More information

Testing Objectives. Successful testing: discovers previously unknown errors

Testing Objectives. Successful testing: discovers previously unknown errors Testing Objectives Informal view: Testing: a process of executing software with the intent of finding errors Good testing: a high probability of finding as-yetundiscovered errors Successful testing: discovers

More information

Testing Tools. Software Testing and Verification. Lecture 14. Stephen M. Thebaut, Ph.D. Prepared by. University of Florida

Testing Tools. Software Testing and Verification. Lecture 14. Stephen M. Thebaut, Ph.D. Prepared by. University of Florida Testing Tools Software Testing and Verification Lecture 14 Prepared by Stephen M. Thebaut, Ph.D. University of Florida Overview of Topics Why is test automation desirable? Types of test automation test

More information

10. Software Testing Fundamental Concepts

10. Software Testing Fundamental Concepts 10. Software Testing Fundamental Concepts Department of Computer Science and Engineering Hanyang University ERICA Campus 1 st Semester 2016 Testing in Object-Oriented Point of View Error Correction Cost

More information

Testing Digital Systems I

Testing Digital Systems I Testing Digital Systems I Lecture 6: Fault Simulation Instructor: M. Tahoori Copyright 2, M. Tahoori TDS I: Lecture 6 Definition Fault Simulator A program that models a design with fault present Inputs:

More information

UNIT-4 Black Box & White Box Testing

UNIT-4 Black Box & White Box Testing Black Box & White Box Testing Black Box Testing (Functional testing) o Equivalence Partitioning o Boundary Value Analysis o Cause Effect Graphing White Box Testing (Structural testing) o Coverage Testing

More information

UNDERSTANDING PROBLEMS AND HOW TO SOLVE THEM BY USING COMPUTERS

UNDERSTANDING PROBLEMS AND HOW TO SOLVE THEM BY USING COMPUTERS UNDERSTANDING PROBLEMS AND HOW TO SOLVE THEM BY USING COMPUTERS INTRODUCTION TO PROBLEM SOLVING Introduction to Problem Solving Understanding problems Data processing Writing an algorithm CONTINUE.. Tool

More information

Compiler Design. Fall Control-Flow Analysis. Prof. Pedro C. Diniz

Compiler Design. Fall Control-Flow Analysis. Prof. Pedro C. Diniz Compiler Design Fall 2015 Control-Flow Analysis Sample Exercises and Solutions Prof. Pedro C. Diniz USC / Information Sciences Institute 4676 Admiralty Way, Suite 1001 Marina del Rey, California 90292

More information

ENGR 1181 MATLAB 09: For Loops 2

ENGR 1181 MATLAB 09: For Loops 2 ENGR 1181 MATLAB 09: For Loops Learning Objectives 1. Use more complex ways of setting the loop index. Construct nested loops in the following situations: a. For use with two dimensional arrays b. For

More information

Scribes: Romil Verma, Juliana Cook (2015), Virginia Williams, Date: May 1, 2017 and Seth Hildick-Smith (2016), G. Valiant (2017), M.

Scribes: Romil Verma, Juliana Cook (2015), Virginia Williams, Date: May 1, 2017 and Seth Hildick-Smith (2016), G. Valiant (2017), M. Lecture 9 Graphs Scribes: Romil Verma, Juliana Cook (2015), Virginia Williams, Date: May 1, 2017 and Seth Hildick-Smith (2016), G. Valiant (2017), M. Wootters (2017) 1 Graphs A graph is a set of vertices

More information

Verification Black-box Testing & Testing in the Large

Verification Black-box Testing & Testing in the Large 1 / 18 Verification & Miaoqing Huang University of Arkansas Spring 2010 2 / 18 Outline 1 2 Testing Boundary Conditions 3 Module Testing Integration Testing 3 / 18 Outline 1 2 Testing Boundary Conditions

More information

Introduction to Software Testing Chapter 3, Sec# 1 & 2 Logic Coverage

Introduction to Software Testing Chapter 3, Sec# 1 & 2 Logic Coverage Introduction to Software Testing Chapter 3, Sec# 1 & 2 Logic Coverage Paul Ammann & Jeff Offutt http://www.cs.gmu.edu/~offutt/soft waretest/ Ch. 3 : Logic Coverage Four Structures for Modeling Software

More information

Subject Software Testing Structural Testing

Subject Software Testing Structural Testing Subject Software Testing Structural Testing Objective: 1. Understand Concept of structural testing 2. How structural (code-based or glass-box) testing complements functional (black-box) testing 3. Recognize

More information

MTAT Software Engineering

MTAT Software Engineering MTAT.03.094 Software Engineering Lecture 11: Verification and Validation (Part 2) Dietmar Pfahl Fall 2015 email: dietmar.pfahl@ut.ee Exam Registration Status as of Nov 19 Exam 1: Friday, 08-Jan-2015, 14:15-16:15,

More information

SE Notes Mr. D. K. Bhawnani, Lect (CSE) BIT

SE Notes Mr. D. K. Bhawnani, Lect (CSE) BIT 1 Unit 4 Software Testing Introduction Once the source code has been developed, testing is required to uncover the errors before it is implemented. In order to perform software testing a series of test

More information

Testing & Debugging TB-1

Testing & Debugging TB-1 Testing & Debugging TB-1 Need for Testing Software systems are inherently complex» Large systems 1 to 3 errors per 100 lines of code (LOC) Extensive verification and validiation is required to build quality

More information

Decision Procedures in First Order Logic

Decision Procedures in First Order Logic in First Order Logic for Equality Logic Daniel Kroening and Ofer Strichman 1 Outline Introduction Definition, complexity Reducing Uninterpreted Functions to Equality Logic Using Uninterpreted Functions

More information

Chapter 4: Control structures. Repetition

Chapter 4: Control structures. Repetition Chapter 4: Control structures Repetition Loop Statements After reading and studying this Section, student should be able to Implement repetition control in a program using while statements. Implement repetition

More information

(How Not To Do) Global Optimizations

(How Not To Do) Global Optimizations (How Not To Do) Global Optimizations #1 One-Slide Summary A global optimization changes an entire method (consisting of multiple basic blocks). We must be conservative and only apply global optimizations

More information

Specifying logic functions

Specifying logic functions CSE4: Components and Design Techniques for Digital Systems Specifying logic functions Instructor: Mohsen Imani Slides from: Prof.Tajana Simunic and Dr.Pietro Mercati We have seen various concepts: Last

More information

The design recipe. Readings: HtDP, sections 1-5. (ordering of topics is different in lectures, different examples will be used)

The design recipe. Readings: HtDP, sections 1-5. (ordering of topics is different in lectures, different examples will be used) The design recipe Readings: HtDP, sections 1-5 (ordering of topics is different in lectures, different examples will be used) Survival and Style Guides CS 135 Winter 2018 02: The design recipe 1 Programs

More information

Test design techniques

Test design techniques INF3121 : Software Testing 12. 02. 2015 Lecture 4 Test design techniques Lecturer: Raluca Florea INF3121/ 12.02.2015 / Raluca Florea 1 Overview 1. The test development process 2. Categories of test design

More information

1 Black Box Test Data Generation Techniques

1 Black Box Test Data Generation Techniques 1 Black Box Test Data Generation Techniques 1.1 Equivalence Partitioning Introduction Equivalence partitioning is based on the premise that the inputs and outputs of a component can be partitioned into

More information

CS 520 Theory and Practice of Software Engineering Fall 2018

CS 520 Theory and Practice of Software Engineering Fall 2018 Today CS 52 Theory and Practice of Software Engineering Fall 218 Software testing October 11, 218 Introduction to software testing Blackbox vs. whitebox testing Unit testing (vs. integration vs. system

More information

Practical Network-wide Packet Behavior Identification by AP Classifier

Practical Network-wide Packet Behavior Identification by AP Classifier Practical Network-wide Packet Behavior Identification by AP Classifier NETWORK-WIDE PACKET BEHAVIOR IDENTIFICATION o An control plane application identifying forwarding behaviors of packets in a flow:

More information

LECTURE 9 TEST DESIGN TECHNIQUES - II

LECTURE 9 TEST DESIGN TECHNIQUES - II LECTURE 9 TEST DESIGN TECHNIQUES - II DECISION TABLE A decision table is a good way to deal with different combination inputs with their associated outputs and also called cause-effect table. Decision

More information

6. Test-Adequacy. Assessment Using Control Flow and Data Flow. Andrea Polini

6. Test-Adequacy. Assessment Using Control Flow and Data Flow. Andrea Polini 6. Test-Adequacy Assessment Using Control Flow and Data Flow Andrea Polini Software Engineering II Software Testing MSc in Computer Science University of Camerino (Software Engineering II Software Testing)

More information

MSc Software Testing MSc Prófun hugbúnaðar

MSc Software Testing MSc Prófun hugbúnaðar MSc Software Testing MSc Prófun hugbúnaðar Fyrirlestrar 7 & 8 Structural Testing White-box tests. 29/8/27 Dr Andy Brooks 1 Case Study Dæmisaga Reference Structural Testing of Programs, A Survey, A A Omar

More information

Induction Variable Identification (cont)

Induction Variable Identification (cont) Loop Invariant Code Motion Last Time Uses of SSA: reaching constants, dead-code elimination, induction variable identification Today Finish up induction variable identification Loop invariant code motion

More information

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

Software Engineering 2 A practical course in software engineering. Ekkart Kindler Software Engineering 2 A practical course in software engineering Quality Management Main Message Planning phase Definition phase Design phase Implem. phase Acceptance phase Mainten. phase 3 1. Overview

More information

Chapter 4: Control structures

Chapter 4: Control structures Chapter 4: Control structures Repetition Loop Statements After reading and studying this Section, student should be able to Implement repetition control in a program using while statements. Implement repetition

More information

CS313D: ADVANCED PROGRAMMING LANGUAGE

CS313D: ADVANCED PROGRAMMING LANGUAGE CS313D: ADVANCED PROGRAMMING LANGUAGE Computer Science Department Lecture 3: C# language basics Lecture Contents 2 C# basics Conditions Loops Methods Arrays Dr. Amal Khalifa, Spr 2015 3 Conditions and

More information

Importance of Predicatebased. Predicate-based Testing. Terms Defined. Terms Defined (2) Terms Defined (3) Assumptions. Thorough testing of C used to

Importance of Predicatebased. Predicate-based Testing. Terms Defined. Terms Defined (2) Terms Defined (3) Assumptions. Thorough testing of C used to Predicate-based Testing Predicates are conditions Divides the input domain into partitions Define the paths of the program Program P Input X; Predicate C If outcome of C is incorrect, Either C is incorrect,

More information