HW7: Due Dec 5th 23:59 1.Describe test cases to reach full path coverage of the triangle program by completing the path condition table below. Also, draw.

Slides:



Advertisements
Similar presentations
Automated Test Data Generation Maili Markvardt. Outline Introduction Test data generation problem Black-box approach White-box approach.
Advertisements

A Survey of Approaches for Automated Unit Testing
Finding bugs: Analysis Techniques & Tools Symbolic Execution & Constraint Solving CS161 Computer Security Cho, Chia Yuan.
Masahiro Fujita Yoshihisa Kojima University of Tokyo May 2, 2008
Marking Schema question1: 40 marks question2: 40 marks question3: 20 marks total: 100 marks.
Satisfiability Modulo Theories (An introduction)
Whitebox Testing Fra: CS Fall Whitebox Testing AKA Structural, Basis Path Test Normally used at unit level Assumes errors at unit level are.
FIT FIT1002 Computer Programming Unit 19 Testing and Debugging.
White Box Testing and Symbolic Execution Written by Michael Beder.
Software Testing and Quality Assurance
White Box Testing and Symbolic Execution Written by Michael Beder.
Domain Testing Based on Character String Predicate Ruilian Zhao Computer Science Dept. Beijing University of Chemical Technology Michael R. Lyu Computer.
1 Advanced Material The following slides contain advanced material and are optional.
Algorithms. Introduction Before writing a program: –Have a thorough understanding of the problem –Carefully plan an approach for solving it While writing.
Chapter 3 Combinational Logic Design
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
CHAPTER 10 Recursion. 2 Recursive Thinking Recursion is a programming technique in which a method can call itself to solve a problem A recursive definition.
Software Testing and QA Theory and Practice (Chapter 4: Control Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
Testing Dr. Andrew Wallace PhD BEng(hons) EurIng
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
Fruitful functions. Return values The built-in functions we have used, such as abs, pow, int, max, and range, have produced results. Calling each of these.
Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.
CUTE: A Concolic Unit Testing Engine for C Technical Report Koushik SenDarko MarinovGul Agha University of Illinois Urbana-Champaign.
Chapter 5 - Part Sequential Circuit Design Design Procedure  Specification  Formulation - Obtain a state diagram or state table  State Assignment.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
1 Program Correctness CIS 375 Bruce R. Maxim UM-Dearborn.
Exercise Solutions 2014 Fall Term. Week 2: Exercise 1 public static Boolean repOK(Stack mystack) { if (mystack.capacity() < 0) { return false;
CS1101: Programming Methodology Aaron Tan.
CS 363 Comparative Programming Languages Semantics.
Introduction to Exception Handling and Defensive Programming.
Intro. to Logic CS402 1 HW #5: Due June 6th 23:59 HW #5: Due June 6th 23:59.
HW6: Due Dec 8th 23:59 1.Describe test cases to reach full path coverage of the triangle program by completing the path condition table below. Also, draw.
Lazy Annotation for Program Testing and Verification Speaker: Chen-Hsuan Adonis Lin Advisor: Jie-Hong Roland Jiang November 26,
Xusheng Xiao North Carolina State University CSC 720 Project Presentation 1.
Week 14 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
HW#3: Due Nov 9 NOTE. Submit both hardcopy and softcopy. 1. Formal verification of a flash memory reading unit (70 pts) – Show the correctness of the flash_read()
HW4: Due Nov 24th 23:59 1.Describe test cases to reach full path coverage of the triangle program by completing the path condition table below. Also, draw.
Symbolic and Concolic Execution of Programs Information Security, CS 526 Omar Chowdhury 10/7/2015Information Security, CS 5261.
CUTE: A Concolic Unit Testing Engine for C Koushik SenDarko MarinovGul Agha University of Illinois Urbana-Champaign.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
1 Test Coverage Coverage can be based on: –source code –object code –model –control flow graph –(extended) finite state machines –data flow graph –requirements.
From Conventional Languages to Prolog –What we can do in conventional languages but not in Prolog –What we can do in Prolog but not in conventional languages.
Random Test Generation of Unit Tests: Randoop Experience
Digitaalsüsteemide verifitseerimise kursus1 Exercises Binary decision diagrams ROBDD generation. Shannon expansion Finding an optimal ordering Dynamic.
Chapter 7 Modularity Using Functions: Part II. A First Book of ANSI C, Fourth Edition 2 Variable Scope If variables created inside a function are available.
Programming Languages Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
Control Flow Testing Handouts
Outline of the Chapter Basic Idea Outline of Control Flow Testing
Data Coverage and Code Coverage
Moonzoo Kim CS Dept. KAIST
Moonzoo Kim CS Dept. KAIST
White-Box Testing Using Pex
UNIT-4 BLACKBOX AND WHITEBOX TESTING
4 Main Steps of Concolic Testing
HW5: Due Dec 6 23:59 Show the equivalence of the following two circuits by using a SMT solver 1.1 Specify the left circuit in QF_UF 1.2 Specify the right.
Compiler design.
GNU gcov gcov is a test coverage program running with gcc.
Whitebox Testing.
CUTE: A Concolic Unit Testing Engine for C
CSE 1020:Software Development
1. Show the correctness of the following max() (50 pts)
Testing grep.c (200 pts) For grep.c, generate 10,000 test cases through the (reverse) DFS search strategy. You are requested to modify grep.c to create.
HW4: Concolic testing Busybox expr (due Nov 30 23:59)
HW4: Due Nov 22nd 23:59 Describe test cases to reach full path coverage of the triangle program by completing the path condition table below. Also,
HW7: Due Dec 5th 23:59 Describe test cases to reach full path coverage of the triangle program by completing the path condition table below. Also, draw.
HW#7 Describe test cases to reach full path coverage of the triangle program by completing the path condition table below. Also, draw the complete execution.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Moonzoo Kim Provable Software Laboratory CS Dept. KAIST
Presentation transcript:

HW7: Due Dec 5th 23:59 1.Describe test cases to reach full path coverage of the triangle program by completing the path condition table below. Also, draw the complete execution tree showing executed path conditions (100 pts) – Assume that the initial test case is given as 1,1,1 – You should use the DFS algorithm. – Note that CREST uses reverse-dfs search heuristics in fact. Thus, your solutions will be different from what CREST generated

For grep.c, generate 10,000 test cases through the (reverse) DFS search strategy. You are requested to modify grep.c to create test cases through CREST and feed those generated test cases to grep. You should report the following items carefully: 1.Describe which variables are declared symbolically and how How long is a target pattern, a target file, options, etc 2.Describe how you modified the target code to improve branch coverage 3.Create 10,000 test cases in files (i.e.,tc1, tc2,… tc10000) per each of the 4 different search strategies 4.Measure the final branch coverage (i.e., condition coverage in the original target program) reported by CREST You should report the branch coverage per search strategy You can do this by analyzing branch and coverage output file 5.Apply the 40,000 test cases (tc1,…tc10000 x 4) to grep and measure the branch coverage reported by gcov For this task, you should not use CREST. You may build a shell script to execute grep 40,000 times with 40,000 test cases. (options) The persons who achieve the best, 2 nd best, and the 3 rd best coverage among the classmates will get extra 200 points. 2. Testing grep.c (200 pts)

Same to the problem #2 except that you can use the initial test cases that you manually generated to guide concolic execution. 1.Generate 10 test cases manually. 2.Convert each of the 10 manual initial test cases into crest input file 3.Run the provided crest with the input file you created. 4.The rest of the task is same to the problem #2 except that you should automatically generate 999 test cases per each manual initial test case so that the total # of test cases obtained should be the same to the problem # ,000 test cases (= 3 search strategies x 10 initial test cases x (1 initial test case +999 automatically generated test cases)) - We don’t use random_input search strategy which does not leverage a manual test case. 5.Report how much automatically generated test cases from the initial test case achieve the gcov branch coverage. - In other words, report the gcov branch coverage per manual initial test case (+ 999 test cases ) and per search strategy (i.e., you have to report 40 coverage results (= 10 coverage results obtained from CREST using the initial test cases x 4 search strategies) 3. Testing grep.c by utilizing initial test cases (100 pts)

3. Testing grep.c by utilizing initial test cases (100 pts) (cont.) Initial input gcov branch coverage DFSCFGRandom TC1grep –a 10 abcd f.txtXXXYYYZZZ TC2grep –a 1 –b 3 qwer f.txt … TC1 0

4. Show the correctness of the following max() (200 pts) /* max() should return a bigger value between a and b if a!=b. If a==b, max() should return the value of b*/ int max(int a, int b) { int bigger=0; if( a >= b +1) bigger = a; else bigger= b; return bigger; } 4.1 Write down a proper assert statement to check the correctness of max() 4.2 Transform max() into a SSA form. 4.3 Write down a corresponding QF_LIA specification and check the correctness by using a SMT solver (note. you should show validity, not satisfiability for software verification) 4.4 Write down a corresponding QF_BV and check the correctness by using a SMT solver 4.5 Compare the result of 2.3 and 2.4. Why are the results different?