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.

Slides:



Advertisements
Similar presentations
A Survey of Approaches for Automated Unit Testing
Advertisements

Masahiro Fujita Yoshihisa Kojima University of Tokyo May 2, 2008
School of Computing Clemson University Mathematical Reasoning  Goal: To prove correctness  Method: Use a reasoning table  Prove correctness on all valid.
Digital Circuits.
CSE503: SOFTWARE ENGINEERING SYMBOLIC TESTING, AUTOMATED TEST GENERATION … AND MORE! David Notkin Spring 2011.
Copyright W. Howden1 Lecture 13: Programming by Contract.
CS Data Structures Chapter 3 Stacks and Queues.
CREST Internal Yunho Kim Provable Software Laboratory CS Dept. KAIST.
CUTE: A Concolic Unit Testing Engine for C Technical Report Koushik SenDarko MarinovGul Agha University of Illinois Urbana-Champaign.
June 27, 2002 HornstrupCentret1 Using Compile-time Techniques to Generate and Visualize Invariants for Algorithm Explanation Thursday, 27 June :00-13:30.
STRETCHES AND SHEARS.
Wishnu Prasetya WLP for Automated Testing.
Intro. to Logic CS402 1 HW #5: Due June 6th 23:59 HW #5: Due June 6th 23:59.
Combination of logic gates  Logic gates can be combined to produce more complex functions.  They can also be combined to substitute one type of gate.
Java Basics Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
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.
Basic Gates 2.1 Basic Digital Logic: Application of Digital Gates using AND / OR / NOT ©Paul Godin Created August 2007 Last Update Sept 2013 Basic Gates.
Q1:Royal Garden’s Puzzle as a Model Checking Problem Pictures from UbiSoft HW6: Due Dec 4th 23:59.
Bahareh Sarrafzadeh 6111 Fall 2009
Designing Combinational Logic Circuits
CUTE: A Concolic Unit Testing Engine for C Koushik SenDarko MarinovGul Agha University of Illinois Urbana-Champaign.
 If three sides of one triangle are congruent to the three sides of another triangle, then the two triangles are congruent.  If AB = DE, BC = EF, AC.
Ex2. Tower of Hanio 1/11 Write down a C program to solve the Tower of Hanoi ga me (3 poles and 4 disks) by using CBMC – Hint: you may non-deterministically.
EXAMPLE 4 Prove a construction Write a proof to verify that the construction for copying an angle is valid. SOLUTION Add BC and EF to the diagram. In the.
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.
CSE 331 SOFTWARE DESIGN & IMPLEMENTATION SYMBOLIC TESTING Autumn 2011.
Digitaalsüsteemide verifitseerimise kursus1 Exercises Binary decision diagrams ROBDD generation. Shannon expansion Finding an optimal ordering Dynamic.
Program Design & Development EE 201 C7-1 Spring
Ratio of Areas Unit 11 Section 7 Find the ratio of areas of two triangles. Understand and apply the relationships between scale factors, perimeters, and.
Digital Logic Design. Truth Table  Logic Circuit 1. Start with truth table 2. When your output is a 1, figure out the combination of inputs, ANDs, and.
Ratios in similar polygons
Proving Triangles Congruent
8.3 – Similar Polygons Two polygons are similar if:
Warm UP.
Proving Triangles Congruent
Boolean Expressions Lecture No. 10.
Specifications What? Not how!.
Moonzoo Kim CS Dept. KAIST
Similar figures are figures that have the same shape but not necessarily the same size. The symbol ~ means “is similar to.” 1.
Moonzoo Kim CS Dept. KAIST
CSC215 Homework Homework 11 Due date: Dec 19, 2016.
Proving Triangles Congruent
Proving Triangles Congruent
Proving Triangles Congruent
Key Difference between Manual Testing and Model Checking
Digital Circuits.
Similar Figures Corresponding angles are the same. Corresponding sides are proportional.
HW#2: Due Oct 18 NOTE. Submit both hardcopy and softcopy.
Turn to Page S.35.
The General Triangle C B A.
Key Difference between Manual Testing and Model Checking
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.
Warm-Up What are our two definitions of congruent?
Proving Triangles Congruent
Turn to Page S.35.
Perimeter and Area of Similar Figures
The General Triangle C B A.
1. (50 pts) Concolic testing the sort function
Do Now 1/6/14 Copy HW in your planner.
CUTE: A Concolic Unit Testing Engine for C
Algorithms An algorithm is a set of instructions used to solve a specific problem In order to be useful, an algorithm must have the following properties:
SIMILARITY AND CONGRUENCY
4-4 Proving Congruence SSS, SAS
Pythagoras theorem statement
Proving Triangles Congruent
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.
Moonzoo Kim Provable Software Laboratory CS Dept. KAIST
Presentation transcript:

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 the complete execution tree showing executed path conditions. –Assume that the initial test case is given as 1,1,1 –You should use the DFS algorithm. –You are required to get a concrete solution by using Z3/Yices Describe a SMTLIB spec for each next path condition and attach the snapshots of Z3/Yic es results on the SMTLIB spec Test cas e Input (a,b,c) Executed path conditions (PC) Next PCSolution for the next PC 11,1,1a=b Æ a=c Æ b=c a=b Æ a=c Æ b  c Unsat a=b Æ a  c 1,1,2 2 a=b Æ a  c Æ b  c Æ a+b ≤ c a=b Æ a  c Æ b  c Æ a+b > c 2,2,3 3 a=b Æ a  c Æ b  c Æ a+b > c a=b Æ a  c Æ b=c Unsat abab 2,1,2 4 a  b Æ a=c Æ b  c Æ a+c > b a  bÆ a=c Æ b  c Æ a+c ≤ b 2,5,2

2. Test flash_read() by using CREST 1.Describe your environment model You may use the similar environment model for HW#3-1 but need to m odify You have to specify an assert statement for checking correctness. 2.Enumerate all generated test cases through concolic testing and their result (i.e. assert pass/fail) –/* (pu_id, sect#) for the figure below */ Testcase 1: a (0,1), b (1,1), c (1,2) d (2,3) 3. Compare this concolic experiment with the CBMC experiments in HW# Covered cases/distributions 2. Performance ab c d Sector 0 Sector 1 Sector 2 Sector 3 PU0~PU3 A distribution of “abcd” SAM0~SAM3

typedef struct _SAM_type{ unsigned char offset[SECT_PER_U]; }SAM_type; typedef struct _PU_type{ unsigned char sect[SECT_PER_U]; }PU_type; // Environment assumption // 0. Each unit contains 4 sectors. // 1. There is one logical unit containing "abcd" // 2. There are 4 physical units // 3. The value of SAM table is 255 if the corresponding // physical sector does not have a valid data void flash_read(char *buf, SAM_type *SAM, PU_type *pu ){ unsigned char nSamIdx = 0; unsigned char pu_id = 0; unsigned char n_scts = 4; // number of sectors to read unsigned char offset = 0; //offset of the physical sector to read unsigned char pBuf = 0; while(n_scts > 0){ pu_id=0; offset = 255; // read 1 character while(1) { if (SAM[pu_id].offset[nSamIdx] != 255){ offset = SAM[pu_id].offset[nSamIdx++]; buf[pBuf] = PU[pu_id].sect[offset]; break; } pu_id ++; } n_scts--; pBuf ++; }

3. Prove the correctness of copy2 by using WHY - You should write down requires/ensures annotation - You may also need loop invariant, variant, and assertion /* Contract: Return value should be same as input value x as long as x >= 0 */ int copy2(int x) { int y=0; while(y !=x) { y++; } return y; }