Key Difference between Manual Testing and Concolic/Symbolic Testing

Slides:



Advertisements
Similar presentations
Queues Printer queues Several jobs submitted to printer Jobs form a queue Jobs processed in same order as they were received.
Advertisements

Lecture for Lab 3, Exp1 of EE505 (Developing Device Driver) T.A. Chulmin Kim CoreLab. Mar, 11, 2011 [XenSchedulerPaper_Hotcloud-commits] r21 - /
Data Structure Lecture-5
Data Structures Lecture 13: QUEUES Azhar Maqsood NUST Institute of Information Technology (NIIT)
Divisor máximo de dois inteiros. unsigned int gcd(unsigned int A, unsigned int B) { if (B > A) return gcd(B,A); else if (B==0) return A; else return gcd(B,A%B);}
Queues1 Part-B2 Queues. Queues2 The Queue ADT (§4.3) The Queue ADT stores arbitrary objects Insertions and deletions follow the first-in first-out scheme.
Lab 8 User Defined Function.
Queues. What is a queue? First-in first-out data structure (FIFO) New objects are placed at rear Removal restricted to front Examples?
Queue using an array. .head.tail Pointers head and tail always point to the first empty slot before or after elements in the list. Thus, initially they.
Cache Table. ARP Modules Output Module Sleep until IP packet is received from IP Software Check cache table for entry corresponding to the destination.
Queues.
Data Structures - Queues
Linked Structures See Section 3.2 of the text.. First, notice that Java allows classes to be recursive, in the sense that a class can have an element.
Mohammad Amin Kuhail M.Sc. (York, UK) University of Palestine Faculty of Engineering and Urban planning Software Engineering Department Computer Science.
The Queue Data Structure Mugurel Ionu Andreica Spring 2012.
Chapter 7 Queues Introduction Queue applications Implementations.
Int fact (int n) { If (n == 0) return 1; else return n * fact (n – 1); } 5 void main () { Int Sum; : Sum = fact (5); : } Factorial Program Using Recursion.
24 September 2002© Willem Visser Program Model Checking Enabling Technology Abstraction void add(Object o) { buffer[head] = o; head = (head+1)%size;
8/2/00SEM107- © Kamin and ReddyClass 5 - Lists - 1 Class 5 - Lists r The list data type r Recursive methods on lists.
1 Lecture 15: Big O Notation (Wednesday) Lecturer: Santokh Singh CompSci 105 SS 2005 Principles of Computer Science Test See Web for Details Don’t be deleted!
© Oxford University Press All rights reserved. Data Structures Using C, 2e Reema Thareja.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 240 Abstract Data Types Queues Dale Roberts, Lecturer
Queues1 © 2014 Goodrich, Tamassia, Goldwasser Presentation for use with the textbook Data Structures and Algorithms in Java, 6 th edition, by M. T. Goodrich,
CSC 172 DATA STRUCTURES. A TALE OF TWO STRUCTURES.
Recursion.
#include <dos. h> void interrupt(
Linked Data Structures
Principles of programming languages 10: Object oriented languages
Queues.
Using Queues: Coded Messages
Linked List.
Number guessing game Pick a random number between 1 and 10
Doubly Linked List Review - We are writing this code
Lectures Queues Chapter 8 of textbook 1. Concepts of queue
Queue data structure.
Specifications What? Not how!.
Stack and Queue APURBO DATTA.
CSC 172 DATA STRUCTURES.
Data Structures 1 1.
HW-6 Deadline Extended to April 27th
Basic Data Types Queues
Pointers.
Key Difference between Manual Testing and Model Checking
Initializing Objects.
Queues 12/3/2018 Queues © 2014 Goodrich, Tamassia, Goldwasser Queues.
Queues: Implemented using Arrays
Queues 3/9/15 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldwasser,
ADT list.
Key Difference between Manual Testing and Model Checking
Washington University
Basic Examples Function Examples Limitation Examples
Part 1: Concepts and Hardware- Based Approaches
Queues FIFO Enqueue Dequeue Peek.
Basic Examples Function Examples Limitation Examples
Mutable Data (define mylist (list 1 2 3)) (bind ((new (list 4)))
CS210- Lecture 5 Jun 9, 2005 Agenda Queues
Basic Examples Function Examples Limitation Examples
ADT Queue (Array Implementation)
Circular Queues: Implemented using Arrays
1. (50 pts) Concolic testing the sort function
Queues Definition of a Queue Examples of Queues
Computer Science I: Get out your notes.
Random Numbers while loop
Types of loops definite loop: A loop that executes a known number of times. Examples: Repeat these statements 10 times. Repeat these statements k times.
Radix Sort Sorted
An Introduction to STL.
break & continue Statements
컴퓨터 프로그래밍 기초 - 13th : 마지막 수업 -
Stacks and Linked Lists
Presentation transcript:

Key Difference between Manual Testing and Concolic/Symbolic Testing A user should test one concrete execution scenario by checking a pair of concrete input values and the expected concrete output values Concolic/symbolic testing A user should imagine all possible execution scenarios and model a general environment that can enable all possible executions A user should describe general invariants on input values and output values

Ex1. Circular Queue of Positive Integers #include<stdio.h> #define SIZE 12 #define EMPTY 0 // We assume that q[] is // empty if head==tail unsigned int q[SIZE],head,tail; void enqueue(unsigned int x) { q[tail]=x; tail=(++tail)%SIZE; } unsigned int dequeue() { unsigned int ret; ret = q[head]; q[head]=0; head= (++head)%SIZE; return ret;} Step 1) 1 2 3 4 5 6 7 8 9 10 11 15 6 9 8 4 head=6 tail=11 Step 2) 3 5 15 6 9 8 4 17 tail=2 head=6 Step 3) 3 5 6 9 8 4 17 tail=2 head=7

void enqueue_verify() { unsigned int x, old_head, old_tail; unsigned int old_q[SIZE], i; __sym_assume(x>0);//if(!(x>0)) exit(); for(i=0; i < SIZE; i++) old_q[i]=q[i]; old_head=head; old_tail=tail; enqueue(x); assert(q[old_tail]==x); assert(tail== ((old_tail +1) % SIZE)); assert(head==old_head); for(i=0; i < old_tail; i++) assert(old_q[i]==q[i]); for(i=old_tail+1; i < SIZE; i++) assert(old_q[i]==q[i]); } void dequeue_verify() { unsigned int ret, old_head, old_tail; unsigned int old_q[SIZE], i; for(i=0; i < SIZE; i++) old_q[i]=q[i]; old_head=head; old_tail=tail; __sym_assume(head!=tail); ret=dequeue(); assert(ret==old_q[old_head]); assert(q[old_head]== EMPTY); assert(head==(old_head+1)%SIZE); assert(tail==old_tail); for(i=0; i < old_head; i++) assert(old_q[i]==q[i]); for(i=old_head+1; i < SIZE; i++) assert(old_q[i]==q[i]);} int main() { environment_setup(); enqueue_test();} int main() { environment_setup(); dequeue_test();}

#include<stdio.h> #define SIZE 12 #define EMPTY 0 // Initial random queue setting following the script void environment_setup() { int i; for(i=0;i<SIZE;i++) { q[i]=EMPTY;} CREST_unsigned_int(head); __sym_assume(0<= head && head < SIZE); CREST_unsigned_int(tail); __sym_assume(0<= tail && tail < SIZE); if( head < tail) for(i=head; i < tail; i++) { CREST_unsigned_int(q[i]);_sym_assume(0< q[i]);} else if(head > tail) { for(i=0; i < tail; i++) { CREST_unsigned_int(q[i]); __sym_assume(0< q[i]);} for(i=head; i < SIZE; i++) { } // We assume that q[] is empty if head==tail printf("head:%u, tail:%u\n",head, tail); for(i=head; i < tail; i++) printf("q[%u]:%u\n",i,q[i]); for(i=0; i < tail; i++) printf("q[%u]:%u\n",i,q[i]); for(i=head; i < SIZE; i++) printf("q[%u]:%u\n",i,q[i]); } #include<stdio.h> #define SIZE 12 #define EMPTY 0 unsigned int q[SIZE],head,tail; void enqueue(unsigned int x) { q[tail]=x; tail=(++tail)%SIZE; } unsigned int dequeue() { unsigned int ret; ret = q[head]; q[head]=0; head= (++head)%SIZE; return ret;