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.

Slides:



Advertisements
Similar presentations
PROOF BY CONTRADICTION
Advertisements

SAT Solver CS 680 Formal Methods Jeremy Johnson. 2 Disjunctive Normal Form  A Boolean expression is a Boolean function  Any Boolean function can be.
Saleem Sabbagh & Najeeb Darawshy Supervisors: Mony Orbach, Technion & Ilia Averbouch, IBM Started at: Winter 2012 Duration: Semester.
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Logic.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
Computability and Complexity 8-1 Computability and Complexity Andrei Bulatov Logic Reminder.
Methods for SAT- a Survey Robert Glaubius CSCE 976 May 6, 2002.
Solving Partial Order Constraints for LPO termination.
Transitivity of  poly Theorem: Let ,  ’, and  ’’ be three decision problems such that   poly  ’ and  ’  poly  ’’. Then  poly  ’’. Proof:
1 Discrete Structures CS 280 Example application of probability: MAX 3-SAT.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
Logical Agents Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2005.
1 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Satisfiability (Reading R&N: Chapter 7)
Using Decision Procedures for Program Verification Christopher Lynch Clarkson University.
Rutgers CS440, Fall 2003 Propositional Logic Reading: Ch. 7, AIMA 2 nd Ed. (skip )
CS 267: Automated Verification Lecture 13: Bounded Model Checking Instructor: Tevfik Bultan.
Daniel Kroening and Ofer Strichman Decision Procedure
1 First order theories. 2 Satisfiability The classic SAT problem: given a propositional formula , is  satisfiable ? Example:  Let x 1,x 2 be propositional.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
SAT Solver Math Foundations of Computer Science. 2 Boolean Expressions  A Boolean expression is a Boolean function  Any Boolean function can be written.
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
Problem (hard) Solution CNF Satisfied assignment Encoding FINITE DOMAIN PROBLEM SOLVING Model Constraint Model Direct Constraint / Bits relation lost.
INTRODUCTION TO ARTIFICIAL INTELLIGENCE COS302 MICHAEL L. LITTMAN FALL 2001 Satisfiability.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 3 Logic Representations (Part 2)
Introduction to Satisfiability Modulo Theories
Predicate Abstraction of ANSI-C Programs Using SAT By Edmund Clarke, Daniel Kroening, Natalia Sharygina, Karen Yorav Presented by Yunho Kim Provable Software.
Sudoku Boolean Logic Representation Upper left square.
LDK R Logics for Data and Knowledge Representation Modal Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module Logic Representations.
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):
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
1 The Wumpus Game StenchBreeze Stench Gold Breeze StenchBreeze Start  Breeze.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Oct, 30, 2015 Slide credit: some slides adapted from Stuart.
NP-completeness Section 7.4 Giorgi Japaridze Theory of Computability.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong The Cook-Levin.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Nikolaj Bjørner Microsoft Research DTU Winter course January 2 nd 2012 Organized by Flemming Nielson & Hanne Riis Nielson.
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
11 Artificial Intelligence CS 165A Thursday, October 25, 2007  Knowledge and reasoning (Ch 7) Propositional logic 1.
Planning as Satisfiability (SAT-Plan). SAT-Plan Translate the planning problem into a satisfiability problem for length n of Plan garb 0 (proposition)present.
Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of.
Satisfiability and SAT Solvers CS 270 Math Foundations of CS Jeremy Johnson.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
NP-complete Languages
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
拉丁方陣 交大應數系 蔡奕正. Definition A Latin square of order n with entries from an n-set X is an n * n array L in which every cell contains an element of X such.
Optimized SAT Encoding For Sudoku Puzzles Will Klieber and Gi-Hwon Kwon Sept 27, 2007 rev. 2 Changes from v1: Added a new slide after “A Better Encoding.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 04 : Logic.
CS 4700: Foundations of Artificial Intelligence
Propositional Logic (a.k.a. Sentential Logic)
CS 4700: Foundations of Artificial Intelligence
ARTIFICIAL INTELLIGENCE
NP-Completeness (36.4-5) P: yes and no in pt NP: yes in pt NPH  NPC
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21
Instructor: Alexander Stoytchev
NP-Completeness Proofs
Modeling Sudoku as a CNF Formula
Introduction to the Boolean Satisfiability Problem
Modeling Sudoku as a CNF Formula
Introduction to the Boolean Satisfiability Problem
PROPOSITIONAL LOGIC - SYNTAX-
Instructor: Alexander Stoytchev
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.
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Modeling Sudoku as a CNF Formula
Instructor: Aaron Roth
Presentation transcript:

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 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); }

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

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

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 pg carefully) Intro. to Logic CS402 5