1 / 5

HW #1. Due Mar 22 Midnight

HW #1. Due Mar 22 Midnight. 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

tdemarco
Download Presentation

HW #1. Due Mar 22 Midnight

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HW #1. Due Mar 22 Midnight

  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 /* 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); } Intro. to Logic CS402

  3. 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” x213 x113 x313 x212 x112 x312 x211 x111 x311 x322 x221 x121 x321 x332 x231 x131 x331 Intro. to Logic CS402

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

  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

More Related