Presentation is loading. Please wait.

Presentation is loading. Please wait.

HW #1. Due Mar 22 Midnight 1. 1. Verify the following program using SAT solver 1. Translate the program into a SSA form 2. Create a Boolean formula from.

Similar presentations


Presentation on theme: "HW #1. Due Mar 22 Midnight 1. 1. Verify the following program using SAT solver 1. Translate the program into a SSA form 2. Create a Boolean formula from."— Presentation transcript:

1 HW #1. Due Mar 22 Midnight 1

2 1. Verify the following program using SAT solver 1. Translate the program into a SSA form 2. Create a Boolean formula from the SSA representation 3. Completely translate arithmetic and equality into propositional formula 4. Translate the formula A into CNF form 5. Run Minisat on A_CNF and capture the result (see the class homepage to find relevant information) and interpret the result Intro. to Logic CS402 2 /* Assume that x and y are 2 bit unsigned integers */ /* Also assume that x+y <= 3 */ void f(unsigned int y) { unsigned int x=1; x=x+y; if (x==2) x+=1; else x=2; assert(x ==2); }

3 2. 2. A Latin square is an n × n table filled with n different symbols in such a way that each symbol occurs exactly once in each row and exactly once in each column. Here is an example for the 3x3 table. - - Encode a 3x3 Latin square problem in a SAT formula using the following variable names and explain your encoding scheme - - Make a Latin square solver like Sudoku solver using minisat2 - - Translate your SAT encoding into DIMACS CNF formula - - For example, if TA adds the 3 clauses “x111 /\ x212 /\ x313” (i.e., (1, 2, 3) as the first row) into your formula, minisat2 should make a model - - “x122/\ x223 /\ x321/\ x133/\ x231 /\x332” - - Or “x132/\ x233 /\ x331/\ x123/\ x221 /\x322” Intro. to Logic CS402 3 x111 x211 x311 x121 x221 x321 x131 x231 x331 x112 x212 x312 x113 x213 x313 x322 x332

4 Intro. to Logic CS402 4 3.Show validity and satisfiability of the following propositional formulas using both - Truth table - Semantic tableau

5 4. Show that semantic tableau method is sound and complete. I.e. prove that A is satisfiable if and only if a semantic tableau tree of A is open. In other words, prove Theorem 2.49 (read 34-38 pg carefully) Intro. to Logic CS402 5


Download ppt "HW #1. Due Mar 22 Midnight 1. 1. Verify the following program using SAT solver 1. Translate the program into a SSA form 2. Create a Boolean formula from."

Similar presentations


Ads by Google