Intro. to Logic CS402 1 HW #5: Due June 6th 23:59 HW #5: Due June 6th 23:59.

Slides:



Advertisements
Similar presentations
Copying and Constructing Triangles Math 2 - Lesson 59 Mr. Lopez.
Advertisements

A Survey of Approaches for Automated Unit Testing
Satisfiability Modulo Theories (An introduction)
PLDI’2005Page 1June 2005 Example (C code) int double(int x) { return 2 * x; } void test_me(int x, int y) { int z = double(x); if (z==y) { if (y == x+10)
Chapter 4: Congruent Triangles Lesson 1: Classifying Triangles.
Quiz Oct “Solving” a Jiggsaw puzzle We want to build a “jigsaw puzzle solver”. You are given 3 jigsaw puzzle pieces, A,B,C and a template. Your.
Lecture 1: Introduction to Digital Logic Design CK Cheng Thursday 9/26/02.
CREST Tutorial Moonzoo Kim Provable Software Laboratory CS Dept. KAIST.
EXAMPLE 1 Classify triangles by sides and by angles SOLUTION The triangle has a pair of congruent sides, so it is isosceles. By measuring, the angles are.
4.1 – Classifying Triangles. Triangles A polygon with three sides. The corners are called vertices A triangle with vertices A, B, and C is called “triangle.
Path testing Path testing is a “design structural testing” in that it is based on detailed design & the source code of the program to be tested. The methodology.
Trigonometry-1 In Greek this just means: Working with Triangles.
CREST Internal Yunho Kim Provable Software Laboratory CS Dept. KAIST.
There’s a quiz on the table. Please take one and get started.
TRIANGLES (There are three sides to every story!).
Classification of Triangles. Table of Contents  Objective Objective  Review Review  Definition of a Triangle  Samples of Triangular Objects  Types.
EQUILATERAL & ISOSCELES Quiz tomorrow. CLASSIFY the triangle by ANGLES and SIDES Angles: acute, obtuse, right Sides:equilateral, isosceles, scalene 91.
Triangle Fundamentals
HW #1. Due Mar 22 Midnight Verify the following program using SAT solver 1. Translate the program into a SSA form 2. Create a Boolean formula from.
Summarizing “Structural” Testing Now that we have learned to create test cases through both: – a) Functional (blackbox)and – b) Structural (whitebox) testing.
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.
Chapter 6.  Control Structures are statements that are used to perform repetitive tasks and to make decisions within a program. Loop repeats a sequence.
HW #2. Due Mar 27 23:59 Do NOT forget to submit both a hardcopy solution to the HW box and a softcopy solution to TA (Youngjoo Kim):
EXAMPLE 1 Standardized Test Practice SOLUTION Let ( x 1, y 1 ) = ( –3, 5) and ( x 2, y 2 ) = ( 4, – 1 ). = (4 – (–3)) 2 + (– 1 – 5) 2 = = 85 (
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.
1 What you will learn  How to solve triangles by using the Law of Cosines  How to find the area of triangles if the measures of the three sides are given.
Triangle Congruency Classifying Triangles by Sides Equilateral Triangle 3 congruent sides Isosceles Triangle At least 2 congruent sides Scalene Triangle.
Symbolic and Concolic Execution of Programs Information Security, CS 526 Omar Chowdhury 10/7/2015Information Security, CS 5261.
Chapter 8 Path Testing. Path testing Path testing is a “design structural testing” in that it is based on detailed design & the source code of the program.
Jim Rahn Based upon NCTM Triangle ClassificationNCTM Triangle Classification.
Designing Combinational Logic Circuits
Do Now – Geometry Take out your Homework to be checked POD – Find the missing interior angles of each triangle. 32° 62° 148°
Equivalence Class Testing Use the mathematical concept of partitioning into equivalence classes to generate test cases for Functional (Black-box) testing.
4.1 Classifying Triangles textbook page 173 Classification by Sides  Equilateral – 3 congruent sides  Isosceles – 2 congruent sides  Scalene – no.
5.2 Proving Triangles are Congruent: SSS and SAS Textbook pg 241.
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.
Digitaalsüsteemide verifitseerimise kursus1 Exercises Binary decision diagrams ROBDD generation. Shannon expansion Finding an optimal ordering Dynamic.
UNIT 4: TRIANGLE CONGRUENCE 4.1 Classifying Triangles.
1 Find the equation of the line that goes through the points (-3, 6) and (-2, 4). y = -2x.
Notes Over 10.1 Finding the Distance Between Two Points Find the distance between the two points.
Objectives Classify triangles by their angle measures and side lengths. Use triangle classification to find angle measures and side lengths.
Triangles.
Software Testing Structural testing 1.
Properties of Triangles
Triangles.
TRIANGLE A B C.
Moonzoo Kim CS Dept. KAIST
Moonzoo Kim CS Dept. KAIST
Table of Contents Date: 10/17 Topic: Classifying Triangles
Agenda: 4.1 Notes Exit Slip Work on Supplement
Applications of the Distance Formula
4-1 Triangles HONORS GEOMETRY.
Triangles © T Madas.
9.1 Apply the Distance and Midpoint Formulas
The General Triangle C B A.
The General Triangle C B A.
HW #2. Due Apr 25 23:59 Do NOT forget to submit both a hardcopy solution to the HW box and a softcopy solution to TA.
முக்கோண சமனின்மைப் பண்பு
Triangles.
Intro to Triangles.
Classifying Triangles
Pythagoras theorem statement
TRIANGLE CONGRUENCE p q r a b c LESSON 17.
4-1 Classifying Triangles
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.
Introduction to Triangles
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.
Area and Perimeter Triangles.
Moonzoo Kim Provable Software Laboratory CS Dept. KAIST
Presentation transcript:

Intro. to Logic CS402 1 HW #5: Due June 6th 23:59 HW #5: Due June 6th 23:59

1. Generate test cases that covers all possible execution paths of the triangle program through depth first search (DFS) traversal. ① Assume that initial test case is (1,1,1) ② Write down a current executed symbolic path condition  and a next symbolic path condition  obtained through DFS traversal ③ Write down a LIA SMT formula for the next symbolic path condition  ④ Solve the LIA SMT specification through Z3 ① If UNSAT, try to negate another branch in a DFS order ② If SAT, record the solution as next input and repeat from Step 2 until all paths are covered/ You have to submit You have to submit - a completed table in page 4 that contains test cases and all executed - a completed table in page 4 that contains test cases and all executed symbolic path conditions and next PCs symbolic path conditions and next PCs - a completed execution tree whose leaves are marked with TCs or UNSAT in pg 4 - a completed execution tree whose leaves are marked with TCs or UNSAT in pg 4 - All LIA SMT specifications for  s and their solutions by Z3 (submit both hardcopy and softcopy that should be sent to - All LIA SMT specifications for  s and their solutions by Z3 (submit both hardcopy and softcopy that should be sent to Intro. to Logic CS402 2

“Software Testing a craftsman’s approach” 2 nd ed by P.C.Jorgensen (no check for positive inputs) #include int main() { int a,b,c, match=0; CREST_int(a); CREST_int(b); CREST_int(c); // filtering out invalid inputs if(a <= 0 ) exit(); if(b <= 0 ) exit(); if(c <= 0 ) exit(); printf("a,b,c = %d,%d,%d:",a,b,c); //0: Equilateral, 1:Isosceles, // 2: Not a traiangle, 3:Scalene int result=-1; if(a==b) match=match+1; if(a==c) match=match+2; if(b==c) match=match+3; if(match==0) { if( a+b <= c) result=2; else if( b+c <= a) result=2; else if(a+c <= b) result =2; else result=3; } else { if(match == 1) { if(a+b <= c) result =2; else result=1; } else { if(match ==2) { if(a+c <=b) result = 2; else result=1; } else { if(match==3) { if(b+c <= a) result=2; else result=1; } else result = 0; } }} printf("result=%d\n",result); }

Concolic Testing the Triangle Program Test case Input (a,b,c) Executed symbolic path condition (PC)  Next PC  Solution for the next PC  from SMT solver 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 ≤ ca=b Æ a  c Æ b  c Æ a+b > c 2,2,3 3 a=b Æ a  c Æ b  c Æ a+b > ca=b Æ a  c Æ b=c Unsat abab 2,1,2 4 a  b Æ a=c Æ b  c Æ a+b > ca  b Æ a=c Æ b  c Æ a+b ≤ c 2,5,2 a=b a=c b=c TC1 (1,1,1) acac bcbc a+b ≤ c TC2 (1,1,2) a+b > c TC3 (2,2,3) abab a=c a+b >c bcbc TC4 bcbc b=c UNSAT